Immediately after unlocking the mutex, thread 2 calls the function pthread_cond_broadcast(&mycond). By doing so, thread 2 will cause all threads waiting on the mycond condition variable to immediately wake up. This means that our first thread (which is in the middle of a pthread_cond_wait() call) will now wake up.

picture loading error handler
12 thought(s)12

Threads in C

pthreads library and threaded programming in C
#C
#programming
#threads
#CS
Get

Explore more quotes