...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Inherited from execution_context.
(Deprecated:
Use make_service()
.) Add a service object to the execution_context
.
template< typename Service> friend void add_service( execution_context & e, Service * svc);
This function is used to add a service to the execution_context
.
The execution_context
object that owns the service.
The service object. On success, ownership of the service object is
transferred to the execution_context
.
When the execution_context
object is destroyed, it will destroy the service object by performing:
delete static_cast<execution_context::service*>(svc)
Thrown if a service of the given type is already present in the
execution_context
.
Thrown if the service's owning execution_context
is not the execution_context
object specified by the e
parameter.
Header: boost/asio/thread_pool.hpp
Convenience header: boost/asio.hpp