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 an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

thread_pool::make_service

Inherited from execution_context.

Creates a service object and adds it to the execution_context.

template<
    typename Service,
    typename... Args>
friend Service & make_service(
    execution_context & e,
    Args &&... args);

This function is used to add a service to the execution_context.

Parameters

e

The execution_context object that owns the service.

args

Zero or more arguments to be passed to the service constructor.

Exceptions

boost::asio::service_already_exists

Thrown if a service of the given type is already present in the execution_context.

Requirements

Header: boost/asio/thread_pool.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext