#include <ConditionVariable.h>
Create a condition variable. name should be a static string which describes the primitive for debugging purposes.
Destroy the condition variable.
void conditionBroadcast |
( |
| ) |
|
Signal a condition. This will unblock all of the waiting threads. Note that only the number of waiting threads will be unblocked. No guarantee is made that these are the same N threads that were blocked at the time of the broadcast.
Signal a condition. This will unblock one of the waiting threads. No guarantee is made as to which thread will be unblocked, but thread implementations typically give preference to the thread that has waited the longest.
bool timedWait |
( |
Mutex & |
m, |
|
|
const struct::timespec * |
abstime |
|
) |
| |
Wait for a condition. This method atomically unlocks mutex, and blocks. The mutex is typically used to guard access to the resource that the thread is waiting for. If the time abstime is reached before the ConditionVariable is signaled, this will return false. Otherewise it will return true.
bool timedWait |
( |
RecursiveMutex & |
m, |
|
|
const struct::timespec * |
abstime |
|
) |
| |
Wait for a condition. This method atomically unlocks mutex, and blocks. The mutex is typically used to guard access to the resource that the thread is waiting for.
The documentation for this class was generated from the following files: