|
ORIGINAL
|
Abstract base class for condition variable implementations. More...
#include <condition.h>


Public Member Functions | |
| conditionBase ()=default | |
| Default constructor. | |
| virtual void | wait (mutexBase &mutex)=0 |
| Waits for notification while holding the mutex. | |
| virtual bool | waitFor (mutexBase &mutex, time::duration d)=0 |
| Waits for notification with timeout. | |
| 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. | |
| virtual void | notify ()=0 |
| Notifies one waiting thread. | |
| virtual void | notifyAll ()=0 |
| Notifies all waiting threads. | |
| 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. | |
Abstract base class for condition variable implementations.
Provides the interface for thread synchronization operations:
Notifies one waiting thread.
| sysError | if notification fails |
Implemented in original::condition.
Notifies all waiting threads.
| sysError | if notification fails |
Implemented in original::condition.
Notifies a specified number of waiting threads.
| n | Number of threads to notify |
This method provides a flexible notification mechanism:
Waits for notification while holding the mutex.
| mutex | Locked mutex to wait on |
| sysError | if wait operation fails |
Implemented in original::condition, and original::condition.
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 |
|
pure virtual |
Waits for notification with timeout.
| mutex | Locked mutex to wait on |
| d | Maximum duration to wait |
| sysError | if wait operation fails |
Implemented in original::condition, and original::condition.