| 166 | } |
| 167 | |
| 168 | void 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 | |
| 177 | void timer_queue::add_timer(std::unique_lock<std::mutex>& lock, timer_ptr new_timer) { |
| 178 | assert(lock.owns_lock()); |