TaskEvent

Binds together a task reference and a boolean flag to indicate the event status.

Allows calling wait/trigger in any order as opposed to the plain resume/suspend.

struct TaskEvent {}

Members

Functions

trigger
void trigger()

Triggers resuming a task paused via wait. If no task is currently paused, raises the flag so that the next wait becomes no-op.

wait
void wait()

Pauses execution of the current task until trigger() is called. If trigger() has already been called before, does nothing.

Meta