11 #ifndef ASIO_DETAIL_OP_QUEUE_HPP 12 #define ASIO_DETAIL_OP_QUEUE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/noncopyable.hpp" 20 #include "asio/detail/push_options.hpp" 25 template <
typename Operation>
31 template <
typename Operation>
32 static Operation* next(Operation* o)
34 return static_cast<Operation*
>(o->next_);
37 template <
typename Operation1,
typename Operation2>
38 static void next(Operation1*& o1, Operation2* o2)
43 template <
typename Operation>
44 static void destroy(Operation* o)
49 template <
typename Operation>
55 template <
typename Operation>
62 template <
typename Operation>
77 while (Operation* op = front_)
80 op_queue_access::destroy(op);
95 Operation* tmp = front_;
96 front_ = op_queue_access::next(front_);
99 op_queue_access::next(tmp, static_cast<Operation*>(0));
104 void push(Operation* h)
106 op_queue_access::next(h, static_cast<Operation*>(0));
109 op_queue_access::next(back_, h);
120 template <
typename OtherOperation>
123 if (Operation* other_front = op_queue_access::front(q))
126 op_queue_access::next(back_, other_front);
128 front_ = other_front;
129 back_ = op_queue_access::back(q);
130 op_queue_access::front(q) = 0;
131 op_queue_access::back(q) = 0;
142 bool is_enqueued(Operation* o)
const 144 return op_queue_access::next(o) != 0 || back_ == o;
160 #include "asio/detail/pop_options.hpp" 162 #endif // ASIO_DETAIL_OP_QUEUE_HPP Definition: noncopyable.hpp:25
Definition: op_queue.hpp:28
Definition: op_queue.hpp:26
Definition: any_io_executor.hpp:28