Synchronization primitive useful for waking a worker after a number of other things complete. More...
#include <CompletionEvent.hpp>
Public Member Functions | |
| CompletionEvent (int64_t count=0) | |
| int64_t | get_count () const |
| void | enroll (int64_t inc=1) |
| void | complete (int64_t decr=1) |
| Decrement count once, if count == 0, wake all waiters. More... | |
| void | wait () |
| void | wait (SuspendedDelegate *c) |
| void | reset () |
| void | send_completion (Core origin, int64_t decr=1) |
Protected Attributes | |
| ConditionVariable | cv |
| int64_t | count |
Synchronization primitive useful for waking a worker after a number of other things complete.
All waiting tasks will be woken as soon as the count goes to 0. Use enroll() to add more tasks.
Fulfills the ConditionVariable type_trait.
Definition at line 56 of file CompletionEvent.hpp.
|
inline |
Definition at line 61 of file CompletionEvent.hpp.
|
inline |
Decrement count once, if count == 0, wake all waiters.
Definition at line 70 of file CompletionEvent.hpp.
|
inline |
Definition at line 65 of file CompletionEvent.hpp.
|
inline |
Definition at line 63 of file CompletionEvent.hpp.
|
inline |
Definition at line 95 of file CompletionEvent.hpp.
|
inline |
Definition at line 80 of file CompletionEvent.hpp.
|
inline |
Definition at line 86 of file CompletionEvent.hpp.
|
protected |
Definition at line 59 of file CompletionEvent.hpp.
|
protected |
Definition at line 58 of file CompletionEvent.hpp.