diff --git a/src/task_queue.hpp b/src/task_queue.hpp index 358fb33..312b4fa 100644 --- a/src/task_queue.hpp +++ b/src/task_queue.hpp @@ -51,7 +51,9 @@ struct task_queue { auto request_shutdown() { + std::unique_lock tq_lock(mtx); stop = true; + tq_lock.unlock(); cv.notify_all(); } };