Open Lighting Architecture  Latest Git
Public Member Functions | List of all members
ola::thread::ConditionVariable Class Reference

Detailed Description

A condition variable

Public Member Functions

 ConditionVariable ()
 
 ~ConditionVariable ()
 
void Wait (Mutex *mutex)
 
bool TimedWait (Mutex *mutex, const ola::TimeStamp &wake_up_time)
 
void Signal ()
 
void Broadcast ()
 

Constructor & Destructor Documentation

◆ ConditionVariable()

ola::thread::ConditionVariable::ConditionVariable ( )

◆ ~ConditionVariable()

ola::thread::ConditionVariable::~ConditionVariable ( )

Clean up

Member Function Documentation

◆ Broadcast()

void ola::thread::ConditionVariable::Broadcast ( )

Wake up all listeners

◆ Signal()

void ola::thread::ConditionVariable::Signal ( )

Wake up a single listener

◆ TimedWait()

bool ola::thread::ConditionVariable::TimedWait ( Mutex mutex,
const ola::TimeStamp wake_up_time 
)

Timed Wait

Parameters
mutexthe mutex that is locked
wake_up_timethe time to wake up. This must be an absolute i.e. real time.
Returns
true if we received a signal, false if the timeout expired.

◆ Wait()

void ola::thread::ConditionVariable::Wait ( Mutex mutex)

Wait on a condition variable

Parameters
mutexthe mutex that is locked

The documentation for this class was generated from the following files: