#include <ConditionVar.h>

Public Member Functions | |
| void | broadcast () |
| Wake up all waiting threads. | |
| void | signal () |
| Wake up a single waiting thread. | |
| void | wait () |
| Atomically unlock the mutex and wait for the predicate to be satisfied. | |
| void | lockMutex () |
| Lock the associated Mutex. | |
| void | unlockMutex () |
| Unlock the associated Mutex. | |
ConditionVar is a synchronization device that allows a thread to block until a predicate is satisfied. It has an associated Mutex which is used to prevent the race condition where one thread calls wait() while another thread simultaneously calls broadcast() or signal(). If all threads always acquire the mutex before signaling the condition, this guarantees that the condition cannot be signaled (and thus ignored) between the time a thread locks the mutex and the time it waits on the condition variable.
Definition at line 38 of file ConditionVar.h.
| void utl::ConditionVar::broadcast | ( | ) |
Wake up all waiting threads.
| void utl::ConditionVar::signal | ( | ) |
Wake up a single waiting thread.
| void utl::ConditionVar::lockMutex | ( | ) |
Lock the associated Mutex.
| void utl::ConditionVar::unlockMutex | ( | ) |
Unlock the associated Mutex.
1.5.6