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

Concept for the valid return types of await_suspend. More...

#include <async_task_promise.hpp>

Concept definition

template<typename Ret>
concept uni20::async::AwaitSuspendResult = std::same_as<Ret, void> || std::same_as<Ret, BasicTask>
Concept for the valid return types of await_suspend.
Definition async_task_promise.hpp:48

Detailed Description

Concept for the valid return types of await_suspend.

An awaiter may return void, or it can return a BasicTask, which means that execution of the current coroutine should be transferred to the new task, resuming the coroutine only after the new task is complete. If a BasicTask is returned, it must have exclusive ownership, otherwise the task cannot be scheduled