|
join 1.0
lightweight network framework library
|
condition variable class for shared memory. More...
#include <condition.hpp>
Public Member Functions | |
| SharedCondition () | |
| default constructor. | |
| SharedCondition (const SharedCondition &other)=delete | |
| copy constructor. | |
| SharedCondition & | operator= (const SharedCondition &other)=delete |
| copy assignment. | |
| SharedCondition (SharedCondition &&other)=delete | |
| move constructor. | |
| SharedCondition & | operator= (SharedCondition &&other)=delete |
| move assignment. | |
| ~SharedCondition () | |
| destroys the mutex object. | |
| void | signal () noexcept |
| unblocks one of the waiting threads. | |
| void | broadcast () noexcept |
| unblocks all threads currently waiting. | |
| void | wait (ScopedLock< SharedMutex > &lock) |
| wait on a condition. | |
| template<class Predicate > | |
| void | wait (ScopedLock< SharedMutex > &lock, Predicate pred) |
| wait on a condition with predicate. | |
| template<class Rep , class Period > | |
| bool | timedWait (ScopedLock< SharedMutex > &lock, std::chrono::duration< Rep, Period > timeout) |
| wait on a condition until timeout expire. | |
| template<class Rep , class Period , class Predicate > | |
| bool | timedWait (ScopedLock< SharedMutex > &lock, std::chrono::duration< Rep, Period > timeout, Predicate pred) |
| wait on a condition with predicate until timeout expire. | |
condition variable class for shared memory.
| SharedCondition::SharedCondition | ( | ) |
default constructor.
|
delete |
copy constructor.
| other | other object to copy. |
|
delete |
move constructor.
| other | other object to move. |
| SharedCondition::~SharedCondition | ( | ) |
destroys the mutex object.
|
noexcept |
unblocks all threads currently waiting.
|
delete |
copy assignment.
| other | other object to copy. |
|
delete |
move assignment.
| other | other object to move. |
|
noexcept |
unblocks one of the waiting threads.
|
inline |
wait on a condition until timeout expire.
| lock | mutex previously locked by the calling thread. |
| timeout | timeout. |
|
inline |
wait on a condition with predicate until timeout expire.
| lock | mutex previously locked by the calling thread. |
| timeout | timeout. |
| pred | predicate. |
| void SharedCondition::wait | ( | ScopedLock< SharedMutex > & | lock | ) |
wait on a condition.
| lock | mutex previously locked by the calling thread. |
|
inline |
wait on a condition with predicate.
| lock | mutex previously locked by the calling thread. |
| pred | predicate. |