io_context::service继承execution_context::service:
(1) 主要的函数在于调用基类execution_context::service的shutdown_service(),用于关闭全部的io_context关联的service
io_context::service::service(boost::asio::io_context& owner)
: execution_context::service(owner)
{
}
io_context::service::~service()
{
}
void io_context::service::shutdown()
{
#if !defined(BOOST_ASIO_NO_DEPRECATED)
shutdown_service();
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
}
#if !defined(BOOST_ASIO_NO_DEPRECATED)
void io_context::service::shutdown_service()
{
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
void io_context::service::notify_fork(io_context::fork_event ev)
{
#if !defined(BOOST_ASIO_NO_DEPRECATED)
fork_service(ev);
#else // !defined(BOOST_ASIO_NO_DEPRECATED)
(void)ev;
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
}
#if !defined(BOOST_ASIO_NO_DEPRECATED)
void io_context::service::fork_service(io_context::fork_event)
{
}
#endif // !defined(BOOST_ASIO_NO_DEPRECATED)