|
Equalizer
1.3.1-git
|
A condition variable and associated lock. More...
#include <condition.h>
Public Member Functions | |
| COBASE_API | Condition () |
| Construct a new condition variable. | |
| COBASE_API | ~Condition () |
| Destruct this condition variable. | |
| COBASE_API void | lock () |
| Lock the mutex. | |
| COBASE_API void | unlock () |
| Unlock the mutex. | |
| COBASE_API void | signal () |
| Signal the condition. | |
| COBASE_API void | broadcast () |
| Broadcast the condition. | |
| COBASE_API void | wait () |
| Atomically unlock the mutex, wait for a signal and relock the mutex. | |
| COBASE_API bool | timedWait (const uint32_t timeout) |
| Atomically unlock the mutex, wait for a signal and relock the mutex. | |
A condition variable and associated lock.
Follows closely pthread_condition and mutex
Definition at line 35 of file co/base/condition.h.
| COBASE_API co::base::Condition::Condition | ( | ) |
Construct a new condition variable.
| COBASE_API co::base::Condition::~Condition | ( | ) |
Destruct this condition variable.
| COBASE_API void co::base::Condition::broadcast | ( | ) |
Broadcast the condition.
| COBASE_API void co::base::Condition::lock | ( | ) |
Lock the mutex.
| COBASE_API void co::base::Condition::signal | ( | ) |
Signal the condition.
| COBASE_API bool co::base::Condition::timedWait | ( | const uint32_t | timeout | ) |
Atomically unlock the mutex, wait for a signal and relock the mutex.
The operation is aborted after the given timeout and false is returned.
| timeout | the timeout in milliseconds to wait for the signal. |
| COBASE_API void co::base::Condition::unlock | ( | ) |
Unlock the mutex.
| COBASE_API void co::base::Condition::wait | ( | ) |
Atomically unlock the mutex, wait for a signal and relock the mutex.
1.3.1-git by
1.8.0