Date: Tue, 14 Apr 2026 16:59:21 +0300
On Tue, 14 Apr 2026 at 16:44, Rhidian De Wit <rhidiandewit_at_[hidden]> wrote:
>
> I saw indeed that they had this built-in and rely on the `as_awaitable` function to become coroutines (not a huge fan of this API design, but I digress), but I couldn't find anything on the promise_type it returns. How will this is `as_awaitable` work? What will it return?
> If it returns a standard-provided promise_type then we can happily discard this thread.
Iit returns a result that you use with co_await in a coroutine whose
result is a std::execution::task.
You can also make your own promise types sender-aware by using
std::execution::with_awaitable_senders.
>
> I saw indeed that they had this built-in and rely on the `as_awaitable` function to become coroutines (not a huge fan of this API design, but I digress), but I couldn't find anything on the promise_type it returns. How will this is `as_awaitable` work? What will it return?
> If it returns a standard-provided promise_type then we can happily discard this thread.
Iit returns a result that you use with co_await in a coroutine whose
result is a std::execution::task.
You can also make your own promise types sender-aware by using
std::execution::with_awaitable_senders.
Received on 2026-04-14 13:59:34
