Appendices > Portable Thread Library > Condition Variables
 
Condition Variables
Condition variables are used to block one or more threads until the member function IlsCond::broadcast is called. Condition variables test against a condition and block depending on the result of the test. For that reason, condition variables are associated with a mutex. For details, see “Mutexes”.. The mutex is used to provide an atomic “unlock and wait” primitive to the condition variable, namely the lock member function.
The reason for the atomic primitive is so that one thread can test and then block without having another thread broadcast before the first thread enters the wait state.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.