C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Automatic Coroutine Cancellation

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Tue, 14 Apr 2026 16:25:52 +0300
On Tue, 14 Apr 2026 at 13:05, Rhidian De Wit via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> There's plenty of coroutine frameworks out there with cancellation built-in, but I'd like it to be part of the C++ standard, not yet another library someone must include to be able to use the C++ coroutines.
> Currently, people have no choice but to:
> A) implement their own promise types (with all of the required knowledge potentially being a problem), or
> B) Rely on external libraries
>
> C++20 introduced coroutines, so I find it pretty natural that the next step is to also provide a standardized way to use coroutines rather than just providing the framework.

C++26 introduces senders, which are awaitable and cancellable (and, of
course, bindable to continuations). So the next step you're suggesting
has already been taken.

Received on 2026-04-14 13:26:06