summaryrefslogtreecommitdiff
path: root/boost/asio/detail/impl/win_object_handle_service.ipp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:22:41 (GMT)
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:22:41 (GMT)
commit3c1df2168531ad5580076ae08d529054689aeedd (patch)
tree941aff6f86393eecacddfec252a8508c7e8351c9 /boost/asio/detail/impl/win_object_handle_service.ipp
parentd6a306e745acfee00e81ccaf3324a2a03516db41 (diff)
downloadboost-3c1df2168531ad5580076ae08d529054689aeedd.zip
boost-3c1df2168531ad5580076ae08d529054689aeedd.tar.gz
boost-3c1df2168531ad5580076ae08d529054689aeedd.tar.bz2
Imported Upstream version 1.70.0upstream/1.70.0
Diffstat (limited to 'boost/asio/detail/impl/win_object_handle_service.ipp')
-rw-r--r--boost/asio/detail/impl/win_object_handle_service.ipp35
1 files changed, 17 insertions, 18 deletions
diff --git a/boost/asio/detail/impl/win_object_handle_service.ipp b/boost/asio/detail/impl/win_object_handle_service.ipp
index db56f72..f356a00 100644
--- a/boost/asio/detail/impl/win_object_handle_service.ipp
+++ b/boost/asio/detail/impl/win_object_handle_service.ipp
@@ -2,7 +2,7 @@
// detail/impl/win_object_handle_service.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2011 Boris Schaeling (boris@highscore.de)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -28,10 +28,9 @@ namespace boost {
namespace asio {
namespace detail {
-win_object_handle_service::win_object_handle_service(
- boost::asio::io_context& io_context)
- : service_base<win_object_handle_service>(io_context),
- io_context_(boost::asio::use_service<io_context_impl>(io_context)),
+win_object_handle_service::win_object_handle_service(execution_context& context)
+ : execution_context_service_base<win_object_handle_service>(context),
+ scheduler_(boost::asio::use_service<scheduler_impl>(context)),
mutex_(),
impl_list_(0),
shutdown_(false)
@@ -53,7 +52,7 @@ void win_object_handle_service::shutdown()
lock.unlock();
- io_context_.abandon_operations(ops);
+ scheduler_.abandon_operations(ops);
}
void win_object_handle_service::construct(
@@ -179,7 +178,7 @@ void win_object_handle_service::destroy(
if (is_open(impl))
{
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
HANDLE wait_handle = impl.wait_handle_;
@@ -204,7 +203,7 @@ void win_object_handle_service::destroy(
::CloseHandle(impl.handle_);
impl.handle_ = INVALID_HANDLE_VALUE;
- io_context_.post_deferred_completions(ops);
+ scheduler_.post_deferred_completions(ops);
}
}
@@ -229,7 +228,7 @@ boost::system::error_code win_object_handle_service::close(
{
if (is_open(impl))
{
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
mutex::scoped_lock lock(mutex_);
@@ -265,7 +264,7 @@ boost::system::error_code win_object_handle_service::close(
boost::asio::error::get_system_category());
}
- io_context_.post_deferred_completions(completed_ops);
+ scheduler_.post_deferred_completions(completed_ops);
}
else
{
@@ -281,7 +280,7 @@ boost::system::error_code win_object_handle_service::cancel(
{
if (is_open(impl))
{
- BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ BOOST_ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle",
&impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "cancel"));
mutex::scoped_lock lock(mutex_);
@@ -307,7 +306,7 @@ boost::system::error_code win_object_handle_service::cancel(
ec = boost::system::error_code();
- io_context_.post_deferred_completions(completed_ops);
+ scheduler_.post_deferred_completions(completed_ops);
}
else
{
@@ -341,7 +340,7 @@ void win_object_handle_service::wait(
void win_object_handle_service::start_wait_op(
win_object_handle_service::implementation_type& impl, wait_op* op)
{
- io_context_.work_started();
+ scheduler_.work_started();
if (is_open(impl))
{
@@ -359,13 +358,13 @@ void win_object_handle_service::start_wait_op(
else
{
lock.unlock();
- io_context_.post_deferred_completion(op);
+ scheduler_.post_deferred_completion(op);
}
}
else
{
op->ec_ = boost::asio::error::bad_descriptor;
- io_context_.post_deferred_completion(op);
+ scheduler_.post_deferred_completion(op);
}
}
@@ -392,7 +391,7 @@ void win_object_handle_service::register_wait_callback(
}
lock.unlock();
- io_context_.post_deferred_completions(completed_ops);
+ scheduler_.post_deferred_completions(completed_ops);
}
}
@@ -434,9 +433,9 @@ void win_object_handle_service::wait_callback(PVOID param, BOOLEAN)
}
}
- io_context_impl& ioc = impl->owner_->io_context_;
+ scheduler_impl& sched = impl->owner_->scheduler_;
lock.unlock();
- ioc.post_deferred_completions(completed_ops);
+ sched.post_deferred_completions(completed_ops);
}
}