MCPcopy Create free account
hub / github.com/cinder/Cinder / cancel_timer

Method cancel_timer

include/asio/detail/timer_queue.hpp:175–193  ·  view source on GitHub ↗

Cancel and dequeue operations for the given timer.

Source from the content-addressed store, hash-verified

173
174 // Cancel and dequeue operations for the given timer.
175 std::size_t cancel_timer(per_timer_data& timer, op_queue<operation>& ops,
176 std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)())
177 {
178 std::size_t num_cancelled = 0;
179 if (timer.prev_ != 0 || &timer == timers_)
180 {
181 while (wait_op* op = (num_cancelled != max_cancelled)
182 ? timer.op_queue_.front() : 0)
183 {
184 op->ec_ = asio::error::operation_aborted;
185 timer.op_queue_.pop();
186 ops.push(op);
187 ++num_cancelled;
188 }
189 if (timer.op_queue_.empty())
190 remove_timer(timer);
191 }
192 return num_cancelled;
193 }
194
195 // Move operations from one timer to another, empty timer.
196 void move_timer(per_timer_data& target, per_timer_data& source)

Callers

nothing calls this directly

Calls 4

frontMethod · 0.45
popMethod · 0.45
pushMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected