...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Launch a trivial asynchronous operation that completes immediately.
template< typename ExecutionContext, typename NullaryToken = default_completion_token_t<typename ExecutionContext::executor_type>> DEDUCED async_immediate( ExecutionContext & ctx, NullaryToken && token = default_completion_token_t< typename ExecutionContext::executor_type >(), constraint_t< is_convertible< ExecutionContext &, execution_context & >::value > = 0);
The async_immediate function is intended for use by composed operations, which can delegate to this operation in order to implement the correct semantics for immediate completion.
The execution context used to obtain the asynchronous operation's I/O executor.
The completion token.
The completion handler is immediately submitted for execution by calling
dispatch
on the handler's associated immediate executor.
If the completion handler does not have a customised associated immediate
executor, then the handler is submitted as if by calling post
on the I/O executor obtained
from the supplied execution context.
void()