Represents a condition variable.
More...
#include <AUI/Thread/AConditionVariable.h>
|
void | notify_all () noexcept |
|
void | notify_one () noexcept |
|
template<typename Lock> |
void | wait (Lock &lock) |
|
template<typename Lock, typename Predicate> |
void | wait (Lock &lock, Predicate &&predicate) |
|
template<typename Lock, typename Duration> |
void | wait_for (Lock &lock, Duration duration) |
|
template<typename Lock, typename Duration, typename Predicate> |
void | wait_for (Lock &lock, Duration duration, Predicate &&predicate) |
|
template<typename Lock, typename Timepoint> |
void | wait_until (Lock &lock, Timepoint timepoint) |
|
template<typename Lock, typename Duration, typename Predicate> |
void | wait_until (Lock &lock, Duration duration, Predicate &&predicate) |
|
Represents a condition variable.
AConditionVariable extends std::condition_variable with thread interruption functionality.
◆ notify_all()
void AConditionVariable::notify_all |
( |
| ) |
|
|
inlinenoexcept |
Notifies all observing threads.
- Performance note
- This function is faster than notify_one.
◆ notify_one()
void AConditionVariable::notify_one |
( |
| ) |
|
|
inlinenoexcept |
Notifies one observing thread.
- Performance note
- This function is slower than notify_all.
◆ wait()
template<typename Lock, typename Predicate>
void AConditionVariable::wait |
( |
Lock & | lock, |
|
|
Predicate && | predicate ) |
|
inline |
Waits for the notification.
- Parameters
-
lock | lock. |
predicate | which returns false if the waiting should be continued. |
◆ wait_for() [1/2]
template<typename Lock, typename Duration>
void AConditionVariable::wait_for |
( |
Lock & | lock, |
|
|
Duration | duration ) |
|
inline |
Waits for the notification.
- Parameters
-
lock | lock. |
duration | duration to waitForExitCode for. |
◆ wait_for() [2/2]
template<typename Lock, typename Duration, typename Predicate>
void AConditionVariable::wait_for |
( |
Lock & | lock, |
|
|
Duration | duration, |
|
|
Predicate && | predicate ) |
|
inline |
Waits for the notification.
- Parameters
-
lock | lock. |
duration | duration to waitForExitCode for. |
predicate | which returns false if the waiting should be continued. |
◆ wait_until() [1/2]
template<typename Lock, typename Duration, typename Predicate>
void AConditionVariable::wait_until |
( |
Lock & | lock, |
|
|
Duration | duration, |
|
|
Predicate && | predicate ) |
|
inline |
Waits until the notification.
- Parameters
-
lock | lock. |
duration | duration to waitForExitCode until. |
predicate | which returns false if the waiting should be continued. |
◆ wait_until() [2/2]
template<typename Lock, typename Timepoint>
void AConditionVariable::wait_until |
( |
Lock & | lock, |
|
|
Timepoint | timepoint ) |
|
inline |
Waits until the notification.
- Parameters
-
lock | lock. |
timepoint | timepoint to waitForExitCode until. |
The documentation for this class was generated from the following file: