asio C++ library

PrevUpHomeNext

make_work_guard (4 of 5 overloads)

Create an executor_work_guard object.

template<
    typename T,
    typename Executor>
executor_work_guard< associated_executor_t< T, Executor > > make_work_guard(
    const T & t,
    const Executor & ex,
    constraint_t< is_executor< Executor >::value||execution::is_executor< Executor >::value >  = 0);
Parameters

t

An arbitrary object, such as a completion handler, for which the associated executor will be obtained.

ex

An executor to be used as the candidate object when determining the associated executor.

Return Value

A work guard constructed with the associated executor of the object t, which is obtained as if by calling get_associated_executor(t, ex).


PrevUpHomeNext