Thread Conditional Wait with Mutex : pthread_cond_t

Brief Condition variables provide yet another way for threads to synchronize. While mutexes implement synchronization by controlling thread access to data, condition variables allow threads to synchronize based upon the actual value of data. Without condition variables, the programmer would need to have threads continually polling (possibly in a critical section), to check if the condition is met. This can be very resource consuming since the thread would be continuously busy in this activity....

September 10, 2016 · 3 min · 520 words · Vishal Chovatiya