Senders and Coroutines Together
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Train IT's sixth-to-eighth installment on std::execution shows how C++26 coroutines and senders combine. A std::execution::task is itself a sender, and co_await turns set_error into an exception, so a plain try/catch loop replaces a custom retry sender. A stop request destroys coroutine frames without resuming them. Tasks resume on their start scheduler by default, at the cost of a reschedule per co_await. In stdexec, a task awaiting two tasks allocates three times; a two-step pipeline allocates none. Several standards details were not independently verified.