A Condition is used to suspend threads until some condition changes and the waiting threads are notified. Note that threads waiting for a Condition may be notified even if the watched condition has not changed, so waiting should be done in a loop.
The Mutex that created the Condition must be locked before the wait functions can be called.
Public Types | |
| typedef Uint32 | time |
Public Member Functions | |
| Condition (Condition &) | |
| void | notify () |
| wakes one waiting thread | |
| void | notifyAll () |
| wakes all waiting threads | |
| Condition & | operator= (Condition &) |
| bool | wait (time) |
| suspends this thread until it is woken or the given time has passed | |
| void | wait () |
| suspends this thread until it is woken | |
| ~Condition () | |
|
|
|
|
|
|
|
|
|
|
|
wakes one waiting thread
|
|
|
wakes all waiting threads
Notifies all threads waiting for this
|
|
|
|
|
|
suspends this thread until it is woken or the given time has passed This function blocks the current thread until the thread is notified or the timeout passes.
|
|
|
suspends this thread until it is woken
|
1.4.3