...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 Executor, typename NullaryToken = default_completion_token_t<Executor>> DEDUCED async_immediate( const Executor & ex, NullaryToken && token = default_completion_token_t< Executor >(), constraint_t<(execution::is_executor< Executor >::value &&can_require< Executor, execution::blocking_t::never_t >::value)||is_executor< Executor >::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 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 supplied I/O executor.
void()