boost::capy::run_async
Asynchronously launch a lazy task with stop token and result handler.
Synopsis
Declared in <boost/capy/ex/run_async.hpp>
template<
Executor Ex,
/* implementation-defined */ H1>
[[nodiscard]]
auto
run_async(
Ex ex,
std::stop_token st,
H1 h1);
Description
The stop token is propagated to the task for cooperative cancellation. The handler h1 is called with the result on success, and optionally with exception_ptr if it accepts that type.
Asynchronously launch a lazy task with stop token and allocator.
Parameters
| Name | Description |
|---|---|
ex |
The executor to execute the task on. |
st |
The stop token for cooperative cancellation. |
h1 |
The handler to invoke with the result (and optionally exception). |
alloc |
The allocator for frame allocation (copied and stored). |