Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
uni20::async::TaskFactoryAwaitable Concept Reference

Concept for awaitables that support shared promise-neutral ownership. More...

#include <async_task_promise.hpp>

Concept definition

template<typename T>
concept uni20::async::TaskFactoryAwaitable = requires(T a, TaskFactory factory) {
{ a.await_suspend(std::move(factory)) } noexcept -> std::same_as<void>;
{ a.num_awaiters() } -> std::convertible_to<int>;
}
Concept for awaitables that support shared promise-neutral ownership.
Definition async_task_promise.hpp:87

Detailed Description

Concept for awaitables that support shared promise-neutral ownership.

This concept is satisfied if:

Note
This is used by composite awaiters like all(...) that must split ownership across multiple sub-awaitables.
num_awaiters() runs before ownership transfer and need not be noexcept; await_suspend(TaskFactory) runs afterward and must be.