boost::capy::await_context
Carries the executor, stop token, and frame allocator through a coroutine chain.
Description
This struct bundles the execution context passed through coroutine chains via the ContextAwaitable protocol. It contains the executor for resumption, a stop token for cancellation, and an optional frame allocator for coroutine frame allocation.
Lifetime
Launcher functions (run_async, run) own the await_context and guarantee it outlives all tasks and awaitables in the started chain. Awaitables receive await_context const* in await_suspend and should store it directly, never copy the pointed‐to object.
Thread Safety
The referenced executor and allocator must remain valid for the lifetime of any coroutine using this environment.
Data Members
Name |
Description |
The executor for coroutine resumption. |
|
The frame allocator for coroutine frame allocation. |
|
The owner of the chain segment running in this environment. |
|
The stop token for cancellation propagation. |
See Also
Created with MrDocs