boost::capy::run_async_wrapper::operator()

Launch the task for execution.

Synopsis

template<IoRunnable Task>
void
operator()(Task t) &&;

Description

This operator accepts a task and launches it on the executor. The rvalue ref‐qualifier ensures the wrapper is consumed, enforcing correct LIFO destruction order.

The io_env constructed for the task is owned by the trampoline coroutine and is guaranteed to outlive the task and all awaitables in its chain. Awaitables may store io_env const* without concern for dangling references.

Template Parameters

Name Description

Task

The IoRunnable type.

Parameters

Name Description

t

The task to execute. Ownership is transferred to the run_async_trampoline which will destroy it after completion.

Created with MrDocs