boost::asio 序列8: io_context::service

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)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章