CppCMS
Public Member Functions | List of all members
booster::condition_variable Class Reference

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 ()
 

Detailed Description

This is conditional variable object.

For detailed description of the concept read http://en.wikipedia.org/wiki/Monitor_(synchronization)

Member Function Documentation

void booster::condition_variable::notify_all ( )

Notify all waiting process on the condition. If no process waits then the notification would be ignored

void booster::condition_variable::notify_one ( )

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.


The documentation for this class was generated from the following file: