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)