user2923535
user2923535

Reputation: 594

How do you use pthread_cond_wait() and pthread_cond_signal()?

I'm very confused on how these two functions work with mutex and what they do. Can someone explain them to me and give an example? Thanks!

Upvotes: 0

Views: 402

Answers (1)

Orelsanpls
Orelsanpls

Reputation: 23495

pthread_cond_signal() -> This is explain here

More explanation :

You can do a lots of actions with thread, create, remove, make them stop (lock), make them unlock ... ect

pthread_cond_signal() permit to unlock some lock thread.

pthread_cond_wait() is used to lock some thread.

Upvotes: 1

Related Questions