Awaitable Types and Functions in the Coroutines Library
Get introduced to the awaitable types and functions of coroutines library in C++23.
We'll cover the following
cppcoro provides more awaitable types.
Awaitable types
cppcoro supports various awaitable types:
single_consumer_event
single_consumer_async_auto_reset_event
async_mutex
async_manual_reset_event
async_auto_reset_event
async_latch
sequence_barrier
multi_producer_sequencer
single_producer_sequencer
I want to have a closer look at the awaitables single_consumer_event
and async_mutex
.
single_consumer_event
The single_consumer_event
is, according to the documentation, a simple manual-reset event type that supports only a single coroutine awaiting it at a time. single_consumer_event
provides a new way for the one-time synchronization of threads.
Get hands-on with 1400+ tech skills courses.