A condition variable.
More...
#include <Cond.h>
|
|
| Cond (const Cond &)=delete |
| |
|
Cond & | operator= (const Cond &)=delete |
| |
| void | wait (Mutex &lock) |
| | Unlocks lock and blocks until signal() is called, then reacquires lock before returning.
|
| |
| void | signal () |
| | Wakes every thread currently blocked in wait() on this condition variable.
|
| |
|
| void * | handle = nullptr |
| | Backend-assigned condition variable handle.
|
| |
A condition variable.
Delegates to ThreadDriver for the actual platform primitive. wait() must be called with lock already held; signal() wakes every waiter (see ThreadDriver::signalCond - there is no single-waiter wake across backends).
Definition at line 16 of file Cond.h.
◆ Cond()
◆ ~Cond()
◆ signal()
Wakes every thread currently blocked in wait() on this condition variable.
Definition at line 29 of file Cond.cpp.
◆ wait()
| void Cond::wait |
( |
Mutex & | lock | ) |
|
Unlocks lock and blocks until signal() is called, then reacquires lock before returning.
lock must be locked by the calling thread on entry. Since signal() wakes every waiter, callers must re-check their wake condition in a loop.
Definition at line 23 of file Cond.cpp.
◆ handle
| void* Cond::handle = nullptr |
|
protected |
Backend-assigned condition variable handle.
Definition at line 35 of file Cond.h.
The documentation for this class was generated from the following files: