// detail/impl/kqueue_reactor.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
// Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
#if defined(BOOST_ASIO_HAS_KQUEUE)
+#include <boost/asio/detail/scheduler.hpp>
+
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
namespace detail {
+inline void kqueue_reactor::post_immediate_completion(
+ operation* op, bool is_continuation)
+{
+ scheduler_.post_immediate_completion(op, is_continuation);
+}
+
template <typename Time_Traits>
void kqueue_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
{
return n;
}
+template <typename Time_Traits>
+void kqueue_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+ typename timer_queue<Time_Traits>::per_timer_data* timer,
+ void* cancellation_key)
+{
+ mutex::scoped_lock lock(mutex_);
+ op_queue<operation> ops;
+ queue.cancel_timer_by_key(timer, ops, cancellation_key);
+ lock.unlock();
+ scheduler_.post_deferred_completions(ops);
+}
+
template <typename Time_Traits>
void kqueue_reactor::move_timer(timer_queue<Time_Traits>& queue,
typename timer_queue<Time_Traits>::per_timer_data& target,