ML Reference
|
WaitCondition implements a wait condition for thread synchronization. More...
#include <mlWaitCondition.h>
Public Member Functions | |
WaitCondition () | |
void | wait (Lock &lock) |
Waits for the condition, given a locked non-recursive mutex. | |
template<typename duration_type > | |
bool | wait (Lock &lock, duration_type duration) |
Waits for the condition, given a locked non-recursive mutex. | |
void | notifyAll () |
Notifies all waiting threads. | |
void | notifyOne () |
Notifies one waiting thread. | |
WaitCondition implements a wait condition for thread synchronization.
Thread-safety: This class is thread-safe.
Please note that wait conditions can return from a wait call "spuriously", even when not notified. So the typical use case when waiting for a condition should be:
Definition at line 45 of file mlWaitCondition.h.
|
inline |
Definition at line 48 of file mlWaitCondition.h.
|
inline |
Notifies all waiting threads.
Definition at line 71 of file mlWaitCondition.h.
|
inline |
Notifies one waiting thread.
Definition at line 79 of file mlWaitCondition.h.
|
inline |
Waits for the condition, given a locked non-recursive mutex.
The mutex will be released and locked again when wait() returns.
Definition at line 54 of file mlWaitCondition.h.
|
inline |
Waits for the condition, given a locked non-recursive mutex.
The mutex will be released and locked again when wait() returns.
Definition at line 63 of file mlWaitCondition.h.