AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AConditionVariable Class Reference

Represents a condition variable. More...

#include <AUI/Thread/AConditionVariable.h>

Detailed Description

AConditionVariable extends std::condition_variable with thread interruption functionality.

Member Function Documentation

> All members, including inherited

◆ 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
locklock.
predicatewhich 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
locklock.
durationduration 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
locklock.
durationduration to waitForExitCode for.
predicatewhich 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
locklock.
durationduration to waitForExitCode until.
predicatewhich 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
locklock.
timepointtimepoint to waitForExitCode until.