diff options
Diffstat (limited to '3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp')
-rw-r--r-- | 3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp b/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp index 9b3da7f0959..0c44a41236b 100644 --- a/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp +++ b/3rdparty/asio/include/asio/detail/impl/win_object_handle_service.ipp @@ -2,7 +2,7 @@ // detail/impl/win_object_handle_service.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2021 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 @@ -27,10 +27,9 @@ namespace asio { namespace detail { -win_object_handle_service::win_object_handle_service( - asio::io_context& io_context) - : service_base<win_object_handle_service>(io_context), - io_context_(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_(asio::use_service<scheduler_impl>(context)), mutex_(), impl_list_(0), shutdown_(false) @@ -52,7 +51,7 @@ void win_object_handle_service::shutdown() lock.unlock(); - io_context_.abandon_operations(ops); + scheduler_.abandon_operations(ops); } void win_object_handle_service::construct( @@ -178,7 +177,7 @@ void win_object_handle_service::destroy( if (is_open(impl)) { - ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle", + ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle", &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close")); HANDLE wait_handle = impl.wait_handle_; @@ -203,7 +202,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); } } @@ -228,7 +227,7 @@ asio::error_code win_object_handle_service::close( { if (is_open(impl)) { - ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle", + ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle", &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close")); mutex::scoped_lock lock(mutex_); @@ -264,7 +263,7 @@ asio::error_code win_object_handle_service::close( asio::error::get_system_category()); } - io_context_.post_deferred_completions(completed_ops); + scheduler_.post_deferred_completions(completed_ops); } else { @@ -280,7 +279,7 @@ asio::error_code win_object_handle_service::cancel( { if (is_open(impl)) { - ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle", + ASIO_HANDLER_OPERATION((scheduler_.context(), "object_handle", &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "cancel")); mutex::scoped_lock lock(mutex_); @@ -306,7 +305,7 @@ asio::error_code win_object_handle_service::cancel( ec = asio::error_code(); - io_context_.post_deferred_completions(completed_ops); + scheduler_.post_deferred_completions(completed_ops); } else { @@ -340,7 +339,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)) { @@ -358,13 +357,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_ = asio::error::bad_descriptor; - io_context_.post_deferred_completion(op); + scheduler_.post_deferred_completion(op); } } @@ -391,7 +390,7 @@ void win_object_handle_service::register_wait_callback( } lock.unlock(); - io_context_.post_deferred_completions(completed_ops); + scheduler_.post_deferred_completions(completed_ops); } } @@ -433,9 +432,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); } } |