|
ORIGINAL
|
POSIX condition variable implementation. More...
#include <condition.h>


Public Member Functions | |
| pCondition () | |
| Constructs and initializes the condition variable. | |
| void | wait (mutexBase &mutex) override |
| Waits for notification while holding the mutex. | |
| bool | waitFor (mutexBase &mutex, time::duration d) override |
| Waits for notification with timeout. | |
| void | notify () override |
| Notifies one waiting thread. | |
| void | notifyAll () override |
| Notifies all waiting threads. | |
| ~pCondition () override | |
| Destroys the condition variable. | |
| virtual void | wait (mutexBase &mutex)=0 |
| Waits for notification while holding the mutex. | |
| template<typename Pred > | |
| void | wait (mutexBase &mutex, Pred predicate) noexcept(noexcept(predicate())) |
| Waits until predicate becomes true. | |
| virtual bool | waitFor (mutexBase &mutex, time::duration d)=0 |
| Waits for notification with timeout. | |
| template<typename Pred > | |
| bool | waitFor (mutexBase &mutex, const time::duration &d, Pred predicate) noexcept(noexcept(predicate())) |
| Waits with timeout until predicate becomes true. | |
Public Member Functions inherited from original::conditionBase | |
| conditionBase ()=default | |
| Default constructor. | |
| template<typename Pred > | |
| void | wait (mutexBase &mutex, Pred predicate) noexcept(noexcept(predicate())) |
| Waits until predicate becomes true. | |
| template<typename Pred > | |
| bool | waitFor (mutexBase &mutex, const time::duration &d, Pred predicate) noexcept(noexcept(predicate())) |
| Waits with timeout until predicate becomes true. | |
| void | notifySome (u_integer n) |
| Notifies a specified number of waiting threads. | |
| virtual | ~conditionBase ()=default |
| Virtual destructor. | |
| conditionBase (const conditionBase &)=delete | |
| Deleted copy constructor. | |
| conditionBase & | operator= (const conditionBase &)=delete |
| Deleted copy assignment operator. | |
POSIX condition variable implementation.
Wrapper around pthread_cond_t with RAII semantics. Provides thread synchronization using POSIX condition variables.
|
inlineexplicit |
Constructs and initializes the condition variable.
| sysError | if initialization fails |
|
inlineoverride |
Destroys the condition variable.
|
inlineoverridevirtual |
Notifies one waiting thread.
| sysError | if notification fails |
Implements original::conditionBase.
|
inlineoverridevirtual |
Notifies all waiting threads.
| sysError | if notification fails |
Implements original::conditionBase.
Waits for notification while holding the mutex.
| mutex | Locked mutex to wait on |
| sysError | if wait operation fails |
| valueError | if mutex is not a pMutex |
Implements original::conditionBase.
Waits for notification while holding the mutex.
| mutex | Locked mutex to wait on |
| sysError | if wait operation fails |
Implements original::conditionBase.
Waits until predicate becomes true.
| Pred | Predicate type (must be callable and return bool) |
| mutex | Locked mutex to wait on |
| predicate | Condition predicate to check |
| sysError | if wait operation fails |
|
noexcept |
Waits with timeout until predicate becomes true.
| Pred | Predicate type (must be callable and return bool) |
| mutex | Locked mutex to wait on |
| d | Maximum duration to wait |
| predicate | Condition predicate to check |
| sysError | if wait operation fails |
|
inlineoverridevirtual |
Waits for notification with timeout.
| mutex | Locked mutex to wait on |
| d | Maximum duration to wait |
| sysError | if wait operation fails |
| valueError | if mutex is not a pMutex |
Implements original::conditionBase.
|
virtual |
Waits for notification with timeout.
| mutex | Locked mutex to wait on |
| d | Maximum duration to wait |
| sysError | if wait operation fails |
Implements original::conditionBase.