fix(simu): removed useless stop condition and mutex

This commit is contained in:
Raphael
2025-07-12 12:42:06 +02:00
committed by raphaelcoeffic
parent af44b9f02e
commit 4310617c8a
2 changed files with 0 additions and 12 deletions
-9
View File
@@ -52,18 +52,11 @@ void timer_queue::start()
}
void timer_queue::stop() {
bool stopping = false;
std::unique_lock<std::mutex> lock(_cmds_mutex);
std::unique_lock<std::mutex> slock(_stop_mutex);
if (_running) {
stopping = true;
_running = false;
lock.unlock();
_cmds_condition.notify_one();
_stop_condition.wait(slock);
slock.unlock();
}
_thread->join();
TRACE("<timer_queue> stopped");
@@ -127,8 +120,6 @@ void timer_queue::main_loop() {
async_calls();
trigger_timers();
}
_stop_condition.notify_one();
}
void timer_queue::process_cmds()
-3
View File
@@ -37,9 +37,6 @@ class timer_queue {
std::mutex _cmds_mutex;
std::condition_variable _cmds_condition;
std::mutex _stop_mutex;
std::condition_variable _stop_condition;
std::vector<timer_handle_t*> _timers;
std::vector<timer_async_call_t> _funcs;