mirror of
https://github.com/boostorg/asio.git
synced 2026-02-02 20:32:08 +00:00
A service_maker is an object that is passed to an execution context's
constructor, and allows services to be added at context construction
time. Additional constructor overloads have been added to io_context and
thread_pool that accept a service_maker. For example:
class my_service_maker : public execution_context::service_maker
{
public:
void make(execution_context& ctx) override
{
make_service<my_service>(ctx);
}
};
io_context ctx{my_service_maker{}};
8.5 KiB
8.5 KiB