update boost
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// detail/dev_poll_reactor.hpp
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
||||
// Copyright (c) 2003-2023 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,6 +28,7 @@
|
||||
#include <boost/asio/detail/op_queue.hpp>
|
||||
#include <boost/asio/detail/reactor_op.hpp>
|
||||
#include <boost/asio/detail/reactor_op_queue.hpp>
|
||||
#include <boost/asio/detail/scheduler_task.hpp>
|
||||
#include <boost/asio/detail/select_interrupter.hpp>
|
||||
#include <boost/asio/detail/socket_types.hpp>
|
||||
#include <boost/asio/detail/timer_queue_base.hpp>
|
||||
@@ -42,7 +43,8 @@ namespace asio {
|
||||
namespace detail {
|
||||
|
||||
class dev_poll_reactor
|
||||
: public execution_context_service_base<dev_poll_reactor>
|
||||
: public execution_context_service_base<dev_poll_reactor>,
|
||||
public scheduler_task
|
||||
{
|
||||
public:
|
||||
enum op_types { read_op = 0, write_op = 1,
|
||||
@@ -85,22 +87,43 @@ public:
|
||||
per_descriptor_data& source_descriptor_data);
|
||||
|
||||
// Post a reactor operation for immediate completion.
|
||||
void post_immediate_completion(reactor_op* op, bool is_continuation)
|
||||
{
|
||||
scheduler_.post_immediate_completion(op, is_continuation);
|
||||
}
|
||||
void post_immediate_completion(operation* op, bool is_continuation) const;
|
||||
|
||||
// Post a reactor operation for immediate completion.
|
||||
BOOST_ASIO_DECL static void call_post_immediate_completion(
|
||||
operation* op, bool is_continuation, const void* self);
|
||||
|
||||
// Start a new operation. The reactor operation will be performed when the
|
||||
// given descriptor is flagged as ready, or an error has occurred.
|
||||
BOOST_ASIO_DECL void start_op(int op_type, socket_type descriptor,
|
||||
per_descriptor_data&, reactor_op* op,
|
||||
bool is_continuation, bool allow_speculative);
|
||||
bool is_continuation, bool allow_speculative,
|
||||
void (*on_immediate)(operation*, bool, const void*),
|
||||
const void* immediate_arg);
|
||||
|
||||
// Start a new operation. The reactor operation will be performed when the
|
||||
// given descriptor is flagged as ready, or an error has occurred.
|
||||
void start_op(int op_type, socket_type descriptor,
|
||||
per_descriptor_data& descriptor_data, reactor_op* op,
|
||||
bool is_continuation, bool allow_speculative)
|
||||
{
|
||||
start_op(op_type, descriptor, descriptor_data,
|
||||
op, is_continuation, allow_speculative,
|
||||
&dev_poll_reactor::call_post_immediate_completion, this);
|
||||
}
|
||||
|
||||
// Cancel all operations associated with the given descriptor. The
|
||||
// handlers associated with the descriptor will be invoked with the
|
||||
// operation_aborted error.
|
||||
BOOST_ASIO_DECL void cancel_ops(socket_type descriptor, per_descriptor_data&);
|
||||
|
||||
// Cancel all operations associated with the given descriptor and key. The
|
||||
// handlers associated with the descriptor will be invoked with the
|
||||
// operation_aborted error.
|
||||
BOOST_ASIO_DECL void cancel_ops_by_key(socket_type descriptor,
|
||||
per_descriptor_data& descriptor_data,
|
||||
int op_type, void* cancellation_key);
|
||||
|
||||
// Cancel any operations that are running against the descriptor and remove
|
||||
// its registration from the reactor. The reactor resources associated with
|
||||
// the descriptor must be released by calling cleanup_descriptor_data.
|
||||
@@ -139,6 +162,12 @@ public:
|
||||
typename timer_queue<Time_Traits>::per_timer_data& timer,
|
||||
std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)());
|
||||
|
||||
// Cancel the timer operations associated with the given key.
|
||||
template <typename Time_Traits>
|
||||
void cancel_timer_by_key(timer_queue<Time_Traits>& queue,
|
||||
typename timer_queue<Time_Traits>::per_timer_data* timer,
|
||||
void* cancellation_key);
|
||||
|
||||
// Move the timer operations associated with the given timer.
|
||||
template <typename Time_Traits>
|
||||
void move_timer(timer_queue<Time_Traits>& queue,
|
||||
|
||||
Reference in New Issue
Block a user