Open Lighting Architecture: ola::thread::ConditionVariable Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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 | ( |  | ) |

New 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

  mutex | the mutex that is locked
  wake_up_time | the 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

  mutex | the mutex that is locked

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

- include/ola/thread/Mutex.h
- common/thread/Mutex.cpp