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.
Triggers resuming a task paused via wait. If no task is currently paused, raises the flag so that the next wait becomes no-op.
Pauses execution of the current task until trigger() is called. If trigger() has already been called before, does nothing.
See Implementation
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.