boost::capy::run
Bind a task to an executor with a standard allocator.
Synopsis
Declared in <boost/capy/ex/run.hpp>
template<
Executor Ex,
/* implementation-defined */ Alloc>
[[nodiscard]]
auto
run(
Ex ex,
Alloc alloc);
Description
Await the awaitable in the expression that creates it, as in co_await run(ex, alloc)(task()): the task's frame is allocated from memory the wrapper holds until the end of that expression.
run(Ex) describes teardown and preconditions.
Return Value
A wrapper that accepts a task for execution.
|
The return value should not be discarded. |
Parameters
Name |
Description |
ex |
The executor on which the task should run. |
alloc |
The allocator for frame allocation. |