|
dispenso 1.4.1
A library for task parallelism
|
#include <completion_event.h>
Public Member Functions | |
| void | notify () |
| void | wait () const |
| bool | completed () const |
| template<class Rep , class Period > | |
| bool | waitFor (const std::chrono::duration< Rep, Period > &relTime) const |
| template<class Clock , class Duration > | |
| bool | waitUntil (const std::chrono::time_point< Clock, Duration > &absTime) const |
| void | reset () |
A class which can be used for one-time notify/wait scenarios. It is basically a way to signal to any waiting threads that some event has completed. There must be a single publisher thread and zero or more waiters on arbitrary threads. reset may be called to restart a sequence (e.g. after notify occurs and all waiters have successfully exited wait*).
Definition at line 30 of file completion_event.h.
|
inline |
Peek to see if the event has been notified in any thread
Definition at line 50 of file completion_event.h.
|
inline |
Notify any waiting threads that the event has completed. It is safe for this to be called before threads call wait.
Definition at line 36 of file completion_event.h.
|
inline |
Resets the event to "not-completed". This should not be called while an active wait*\/notify sequence is still currently in play.
Definition at line 80 of file completion_event.h.
|
inline |
Wait for another thread to notify
Definition at line 43 of file completion_event.h.
|
inline |
Wait for another thread to notify or for the relative timeout to expire, whichever is first.
Definition at line 61 of file completion_event.h.
|
inline |
Wait for another thread to notify or for the absolute timeout to expire, whichever is first.
Definition at line 72 of file completion_event.h.