]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
perf: Only wake up one worker thread when a task has been popped
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 26 Oct 2025 11:47:26 +0000 (12:47 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 26 Oct 2025 17:24:21 +0000 (18:24 +0100)
src/ccache/util/threadpool.cpp

index bffe5ae9224bb37efa4358520884ce26c89f93ec..0e579f8f686b5be1a05bc4d1056d95ae553c3082 100644 (file)
@@ -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 (...) {