boost::capy::run_async
Bind an executor, a memory resource, and a result handler to produce a launcher. Invoke the launcher with a task to start it.
Synopsis
Declared in <boost/capy/ex/run_async.hpp>
template<
Executor Ex,
class H1>
[[nodiscard]]
auto
run_async(
Ex ex,
std::pmr::memory_resource* mr,
H1 h1);
Description
Construct the task as the direct argument of the two‐call expression run_async(ex)(task).
Thread Safety
The wrapper itself should only be used from one thread. The handlers may be invoked from any thread where the executor schedules work.
Return Value
A wrapper that accepts a task<T> for immediate execution.
|
The return value should not be discarded. |
Parameters
Name |
Description |
ex |
The executor to execute the task on. |
mr |
The memory resource for frame allocation. |
h1 |
The handler to invoke with the result (and optionally exception). |