#include <Event.h>
|
| cEvent (void) |
|
void | Set (void) |
| Sets the event - releases one thread that has been waiting in Wait(). More...
|
|
void | SetAll (void) |
| Sets the event - releases all threads that have been waiting in Wait(). More...
|
|
bool | Wait (unsigned a_TimeoutMSec) |
| Waits for the event until either it is signalled, or the (relative) timeout is passed. More...
|
|
void | Wait (void) |
| Waits until the event has been set. More...
|
|
Definition at line 17 of file Event.h.
◆ cEvent()
◆ Set()
void cEvent::Set |
( |
void |
| ) |
|
Sets the event - releases one thread that has been waiting in Wait().
If there was no thread waiting, the next call to Wait() will not block.
Definition at line 52 of file Event.cpp.
◆ SetAll()
void cEvent::SetAll |
( |
void |
| ) |
|
Sets the event - releases all threads that have been waiting in Wait().
If there was no thread waiting, the next call to Wait() will not block.
Definition at line 65 of file Event.cpp.
◆ Wait() [1/2]
bool cEvent::Wait |
( |
unsigned |
a_TimeoutMSec | ) |
|
Waits for the event until either it is signalled, or the (relative) timeout is passed.
Returns true if the event was signalled, false if the timeout was hit or there was an error.
Definition at line 36 of file Event.cpp.
◆ Wait() [2/2]
void cEvent::Wait |
( |
void |
| ) |
|
Waits until the event has been set.
If the event has been set before it has been waited for, Wait() returns immediately.
Definition at line 23 of file Event.cpp.
◆ m_CondVar
std::condition_variable cEvent::m_CondVar |
|
private |
The condition variable used as the Event.
Definition at line 47 of file Event.h.
◆ m_Mutex
std::mutex cEvent::m_Mutex |
|
private |
Mutex protecting m_ShouldContinue from multithreaded access.
Definition at line 44 of file Event.h.
◆ m_ShouldContinue
bool cEvent::m_ShouldContinue |
|
private |
Used for checking for spurious wakeups.
Definition at line 41 of file Event.h.
The documentation for this class was generated from the following files: