nCine::CondVariable class

Condition variable for thread synchronization.

The Windows implementation is based on the TinyThread++ library; see http://www.cs.wustl.edu/~schmidt/win32-cv-1.html for the underlying technique. Non-copyable.

Constructors, destructors, conversion operators

CondVariable()
~CondVariable()
CondVariable(const CondVariable&) deleted

Public functions

auto operator=(const CondVariable&) -> CondVariable& deleted
void Wait(Mutex& mutex)
Atomically releases the mutex and blocks until the variable is signalled, then reacquires it.
void Signal()
Wakes up one thread waiting on the variable.
void Broadcast()
Wakes up all threads waiting on the variable.