tmc::manual_reset_event#

An async version of Windows ManualResetEvent.

API Reference#

class manual_reset_event#

An async version of Windows ManualResetEvent.

Public Functions

inline manual_reset_event(bool Ready) noexcept#

The Ready parameter controls the initial state.

inline manual_reset_event() noexcept#

The initial state will be not-set / not-ready.

inline bool is_set() noexcept#

Returns true if the state is set / ready.

inline void reset() noexcept#

Any future awaiters will suspend. If the event state is already reset, this will do nothing.

void set() noexcept#

All current awaiters will be resumed. Any future awaiters will resume immediately. If the event state is already set, this will do nothing. Does not symmetric transfer; awaiters will be posted to their executors.

inline aw_manual_reset_event_co_set co_set() noexcept#

All current awaiters will be resumed. Any future awaiters will resume immediately. If the event state is already set, this will do nothing. Up to one awaiter may be resumed by symmetric transfer if it is eligible (it resumes on the same executor and priority as the caller).

inline aw_manual_reset_event operator co_await() noexcept#

If the event state is set, resumes immediately. Otherwise, waits until set() is called.

~manual_reset_event() noexcept#

On destruction, any awaiters will be resumed.