Warning, file /include/boost/asio/impl/execution_context.ipp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_IMPL_EXECUTION_CONTEXT_IPP
0012 #define BOOST_ASIO_IMPL_EXECUTION_CONTEXT_IPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/execution_context.hpp>
0020 #include <boost/asio/detail/service_registry.hpp>
0021
0022 #include <boost/asio/detail/push_options.hpp>
0023
0024 namespace boost {
0025 namespace asio {
0026
0027 execution_context::execution_context()
0028 : service_registry_(new boost::asio::detail::service_registry(*this))
0029 {
0030 }
0031
0032 execution_context::execution_context(
0033 const execution_context::service_maker& initial_services)
0034 : service_registry_(new boost::asio::detail::service_registry(*this))
0035 {
0036 initial_services.make(*this);
0037 }
0038
0039 execution_context::~execution_context()
0040 {
0041 shutdown();
0042 destroy();
0043 delete service_registry_;
0044 }
0045
0046 void execution_context::shutdown()
0047 {
0048 service_registry_->shutdown_services();
0049 }
0050
0051 void execution_context::destroy()
0052 {
0053 service_registry_->destroy_services();
0054 }
0055
0056 void execution_context::notify_fork(
0057 boost::asio::execution_context::fork_event event)
0058 {
0059 service_registry_->notify_fork(event);
0060 }
0061
0062 execution_context::service::service(execution_context& owner)
0063 : owner_(owner),
0064 next_(0)
0065 {
0066 }
0067
0068 execution_context::service::~service()
0069 {
0070 }
0071
0072 void execution_context::service::notify_fork(execution_context::fork_event)
0073 {
0074 }
0075
0076 execution_context::service_maker::~service_maker()
0077 {
0078 }
0079
0080 service_already_exists::service_already_exists()
0081 : std::logic_error("Service already exists.")
0082 {
0083 }
0084
0085 invalid_service_owner::invalid_service_owner()
0086 : std::logic_error("Invalid service owner.")
0087 {
0088 }
0089
0090 }
0091 }
0092
0093 #include <boost/asio/detail/pop_options.hpp>
0094
0095 #endif