|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Conditional thread suspension and resumption. More...
#include <cc/WaitCondition>
Public Member Functions | |
| WaitCondition () | |
| Create a new wait condition. | |
| void | wait (Mutex &mutex) |
| Wait for a certain condition. | |
| bool | waitUntil (double time, Mutex &mutex) |
| Wait for a certain condition for a limited time. | |
| void | signal () |
| Wake up one waiting thread. | |
| void | broadcast () |
| Wake up all waiting threads. | |
Conditional thread suspension and resumption.
| SystemError |
| WaitCondition | ( | ) |
Create a new wait condition.
| void wait | ( | Mutex & | mutex | ) |
Wait for a certain condition.
| mutex | Mutex protecting the condition state |
| bool waitUntil | ( | double | time, |
| Mutex & | mutex ) |
Wait for a certain condition for a limited time.
| time | Seconds elapsed since the begin of Epoch |
| mutex | Mutex protecting the condition state |
| void signal | ( | ) |
Wake up one waiting thread.
| void broadcast | ( | ) |
Wake up all waiting threads.