asio C++ library

PrevUpHomeNext
thread_pool::use_service (1 of 2 overloads)

Inherited from execution_context.

Obtain the service object corresponding to the given type.

template<
    typename Service>
friend Service & use_service(
    execution_context & e);

This function is used to locate a service object that corresponds to the given service type. If there is no existing implementation of the service, then the execution_context will create a new instance of the service.

Parameters

e

The execution_context object that owns the service.

Return Value

The service interface implementing the specified service type. Ownership of the service interface is not transferred to the caller.

Requirements

Header: asio/thread_pool.hpp

Convenience header: asio.hpp


PrevUpHomeNext