summaryrefslogtreecommitdiff
path: root/boost/asio/detail/reactive_null_buffers_op.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/detail/reactive_null_buffers_op.hpp')
-rw-r--r--boost/asio/detail/reactive_null_buffers_op.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/boost/asio/detail/reactive_null_buffers_op.hpp b/boost/asio/detail/reactive_null_buffers_op.hpp
index dca3a3285f..fb25be335f 100644
--- a/boost/asio/detail/reactive_null_buffers_op.hpp
+++ b/boost/asio/detail/reactive_null_buffers_op.hpp
@@ -2,7 +2,7 @@
// detail/reactive_null_buffers_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)
@@ -28,18 +28,19 @@ namespace boost {
namespace asio {
namespace detail {
-template <typename Handler>
+template <typename Handler, typename IoExecutor>
class reactive_null_buffers_op : public reactor_op
{
public:
BOOST_ASIO_DEFINE_HANDLER_PTR(reactive_null_buffers_op);
- reactive_null_buffers_op(Handler& handler)
+ reactive_null_buffers_op(Handler& handler, const IoExecutor& io_ex)
: reactor_op(&reactive_null_buffers_op::do_perform,
&reactive_null_buffers_op::do_complete),
- 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 status do_perform(reactor_op*)
@@ -54,7 +55,7 @@ public:
// Take ownership of the handler object.
reactive_null_buffers_op* o(static_cast<reactive_null_buffers_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));
@@ -81,6 +82,7 @@ public:
private:
Handler handler_;
+ IoExecutor io_executor_;
};
} // namespace detail