CppCMS
|
This is conditional variable object. More...
#include <booster/booster/thread.h>
Public Member Functions | |
void | wait (unique_lock< mutex > &m) |
void | notify_one () |
void | notify_all () |
This is conditional variable object.
For detailed description of the concept read http://en.wikipedia.org/wiki/Monitor_(synchronization)
Notify all waiting process on the condition. If no process waits then the notification would be ignored
Notify exactly one waiting process on the condition. If no process waits then the notification would be ignored
void booster::condition_variable::wait | ( | unique_lock< mutex > & | m | ) |
Wait for the condition atomically unlocking the mutex referenced by m.
When the condition occurs the lock on the mutex would be acquired again.
Note it is unspecified whether suspicious wakes can occur. It is good idea to check whether the condition hold after this function returns.