From 9beb602b166ebc26b6016a7113658018388c5fae Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Thu, 12 Dec 2024 22:55:57 -0500 Subject: [PATCH] task: ignore paused status while calculating dynamic thread count bees might be unpaused at any time, so make sure that the dynamic load calculation is ready with a non-zero thread count. This avoids a delay of up to 5 seconds when responding to SIGUSR2 when loadavg tracking is enabled. Signed-off-by: Zygo Blaxell --- lib/task.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/task.cc b/lib/task.cc index c839462..e2b046d 100644 --- a/lib/task.cc +++ b/lib/task.cc @@ -530,11 +530,6 @@ namespace crucible { size_t TaskMasterState::calculate_thread_count_nolock() { - if (m_paused) { - // No threads running while paused or cancelled - return 0; - } - if (m_load_target == 0) { // No limits, no stats, use configured thread count return m_configured_thread_max;