]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/asio/detail/winrt_socket_recv_op.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / asio / detail / winrt_socket_recv_op.hpp
index 0701208da47883302914b0b26908a87bfe63be49..34a5a755bf5080df9c948df35ddc37de74904e0f 100644 (file)
@@ -2,7 +2,7 @@
 // detail/winrt_socket_recv_op.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -34,20 +34,22 @@ namespace boost {
 namespace asio {
 namespace detail {
 
-template <typename MutableBufferSequence, typename Handler>
+template <typename MutableBufferSequence, typename Handler, typename IoExecutor>
 class winrt_socket_recv_op :
   public winrt_async_op<Windows::Storage::Streams::IBuffer^>
 {
 public:
   BOOST_ASIO_DEFINE_HANDLER_PTR(winrt_socket_recv_op);
 
-  winrt_socket_recv_op(const MutableBufferSequence& buffers, Handler& handler)
+  winrt_socket_recv_op(const MutableBufferSequence& buffers,
+      Handler& handler, const IoExecutor& io_ex)
     : winrt_async_op<Windows::Storage::Streams::IBuffer^>(
           &winrt_socket_recv_op::do_complete),
       buffers_(buffers),
-      handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler))
+      handler_(BOOST_ASIO_MOVE_CAST(Handler)(handler)),
+      io_executor_(io_ex)
   {
-    handler_work<Handler>::start(handler_);
+    handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
   }
 
   static void do_complete(void* owner, operation* base,
@@ -56,7 +58,7 @@ public:
     // Take ownership of the operation object.
     winrt_socket_recv_op* o(static_cast<winrt_socket_recv_op*>(base));
     ptr p = { boost::asio::detail::addressof(o->handler_), o, o };
-    handler_work<Handler> w(o->handler_);
+    handler_work<Handler, IoExecutor> w(o->handler_, o->io_executor_);
 
     BOOST_ASIO_HANDLER_COMPLETION((*o));
 
@@ -101,6 +103,7 @@ public:
 private:
   MutableBufferSequence buffers_;
   Handler handler_;
+  IoExecutor io_executor_;
 };
 
 } // namespace detail