On Thu, Jun 25, 2026 at 6:11 AM Vinnie Falco <vinnie.falco@gmail.com> wrote:
On Thu, Jun 25, 2026 at 4:56 AM Rainer Deyke via Boost < boost@lists.boost.org> wrote:
Pretty sure that's not actually true.
Capy provides an execution model for coroutines which offers one simple invariant:
A coroutine will always be resumed by the same Executor object which was used to launch it.
I need to clarify this because Seth pointed out that Asio's invariant isn't exactly this in all cases. The above is Asio's default behavior, without using bind_executor. Every plain co_await inside asio's awaitable resumes on the coroutine's associated executor. This is the default completion token path, and it has an escape hatch if you opt out via bind_executor. Capy makes Asio's default behavior mandatory, and omits the escape hatch deliberately. The escape hatch can still be implemented - IoAwaitable is a concept, and users are both able and encouraged to author their own task types when doing so provides advantages for their domain. Thanks