12 #ifndef ASIO_DETAIL_IMPL_KQUEUE_REACTOR_HPP 13 #define ASIO_DETAIL_IMPL_KQUEUE_REACTOR_HPP 15 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 21 #if defined(ASIO_HAS_KQUEUE) 28 template <
typename Time_Traits>
29 void kqueue_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
31 do_add_timer_queue(queue);
35 template <
typename Time_Traits>
36 void kqueue_reactor::remove_timer_queue(timer_queue<Time_Traits>& queue)
38 do_remove_timer_queue(queue);
41 template <
typename Time_Traits>
42 void kqueue_reactor::schedule_timer(timer_queue<Time_Traits>& queue,
43 const typename Time_Traits::time_type& time,
44 typename timer_queue<Time_Traits>::per_timer_data& timer, wait_op* op)
50 io_service_.post_immediate_completion(op,
false);
54 bool earliest = queue.enqueue_timer(time, timer, op);
55 io_service_.work_started();
60 template <
typename Time_Traits>
61 std::size_t kqueue_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
62 typename timer_queue<Time_Traits>::per_timer_data& timer,
63 std::size_t max_cancelled)
66 op_queue<operation> ops;
67 std::size_t n = queue.cancel_timer(timer, ops, max_cancelled);
69 io_service_.post_deferred_completions(ops);
78 #endif // defined(ASIO_HAS_KQUEUE) 80 #endif // ASIO_DETAIL_IMPL_KQUEUE_REACTOR_HPP