boost::capy::run

Bind a task to execute on a specific executor.

Synopsis

Declared in <boost/capy/ex/run.hpp>

template</* implementation-defined */ Ex>
[[nodiscard]]
auto
run(Ex ex);

Description

Returns a wrapper that accepts a task and produces an awaitable. When co_awaited, the task runs on the specified executor.

Example

co_await run(other_executor)(my_task());

Run a task with a custom standard allocator.

The task inherits the caller's executor. The allocator is used for nested frame allocations.

Return Value

A wrapper that accepts a task for execution.

Parameters

Name Description

ex

The executor on which the task should run.

alloc

The allocator for frame allocation.

See Also

task

executor

Created with MrDocs