boost::capy::chain_owner
The owner of one segment of a coroutine chain.
Synopsis
Declared in <boost/capy/ex/abandon.hpp>
class chain_owner;
Description
A segment is a run of coroutines started together: the task run_async launches and everything it awaits, a task run starts on another executor, or one branch of when_all or when_any. Its owner is the coroutine that started it, suspended above the segment's top frame until that frame completes. Every coroutine in the segment reaches the owner through its await_context.
When the holder of a suspended coroutine in the segment gives it up with abandon, the owner posts its own continuation to its executor. There it unwinds the segment from the top: it destroys the frame it awaits, which destroys the frames below it in turn, and finishes without delivering a result. An executor that destroys the posted continuation instead, as a closed one does, unwinds the segment the same way.