From c56b4a00ffa81cd720454312aa63959e578f3bb8 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 26 Oct 2025 12:47:26 +0100 Subject: [PATCH] perf: Only wake up one worker thread when a task has been popped --- src/ccache/util/threadpool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ccache/util/threadpool.cpp b/src/ccache/util/threadpool.cpp index bffe5ae9..0e579f8f 100644 --- a/src/ccache/util/threadpool.cpp +++ b/src/ccache/util/threadpool.cpp @@ -87,7 +87,7 @@ ThreadPool::worker_thread_main() m_task_queue.pop(); } - m_task_popped_condition.notify_all(); + m_task_popped_condition.notify_one(); try { task(); } catch (...) { -- 2.47.3