MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / remove_internal_timer

Method remove_internal_timer

source/timers/timer_queue.cpp:168–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168void timer_queue::remove_internal_timer(timer_ptr existing_timer) {
169 {
170 std::unique_lock<decltype(m_lock)> lock(m_lock);
171 m_request_queue.emplace_back(std::move(existing_timer), timer_request::remove);
172 }
173
174 m_condition.notify_one();
175}
176
177void timer_queue::add_timer(std::unique_lock<std::mutex>& lock, timer_ptr new_timer) {
178 assert(lock.owns_lock());

Callers 1

cancelMethod · 0.80

Calls 1

notify_oneMethod · 0.80

Tested by

no test coverage detected