Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit 84940c5a0e.
PrevUpHomeNext

async_immediate (2 of 2 overloads)

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.

Parameters

ex

The execution context used to obtain the asynchronous operation's I/O executor.

token

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.

Completion Signature
void()

PrevUpHomeNext