| Home | Libraries | People | FAQ | More

#### async_immediate (1 of 2 overloads)

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.

###### Parameters

ex

  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 supplied I/O executor.

###### Completion Signature

    void()