Jafar
|
This class represents a standalone variable condition quite limited but can be useful. More...
This class represents a standalone variable condition quite limited but can be useful.
It is a VariableMutex that you can wait and notify for change
Definition at line 125 of file threads.hpp.
#include <threads.hpp>
Public Member Functions | |
VariableCondition (const T &val_init) | |
template<typename Pred > | |
void | wait (Pred pred, bool unlock=true) |
You can use boost::lambda to easily create the predicate: (#include <boost/lambda/lambda.hpp>) vc.wait(boost::lambda::_1 != 3); or STL bind1st and bind2nd and comparison operators: #include <functional> vc.wait(std::bind1st(std::not_equal_to<int>(),3));. | |
template<typename Pred , typename duration_type > | |
bool | timed_wait (Pred pred, duration_type const &rel_time, bool unlock=true) |
void | notify () |
template<typename Assign > | |
void | applyAndNotify (Assign assign) |
void | setAndNotify (const T &val) |
Protected Attributes | |
boost::condition_variable | c |
Generated on Wed Oct 15 2014 00:37:40 for Jafar by doxygen 1.7.6.1 |