// detail/win_iocp_io_context.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)
//
// 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)
}
// Return whether a handler can be dispatched immediately.
- bool can_dispatch()
- {
- return thread_call_stack::contains(this) != 0;
- }
+ BOOST_ASIO_DECL bool can_dispatch();
/// Capture the current exception so it can be rethrown from a run function.
BOOST_ASIO_DECL void capture_current_exception();
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,