]> git.hungrycats.org Git - bees/commitdiff
task: ignore paused status while calculating dynamic thread count
authorZygo Blaxell <bees@furryterror.org>
Fri, 13 Dec 2024 03:55:57 +0000 (22:55 -0500)
committerZygo Blaxell <bees@furryterror.org>
Fri, 13 Dec 2024 04:10:15 +0000 (23:10 -0500)
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 <bees@furryterror.org>
lib/task.cc

index c8394620f951f5bf236509ba69781e370102d86d..e2b046d304a258508878e2fdd17aabde80440a22 100644 (file)
@@ -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;