1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

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 <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2024-12-12 22:55:57 -05:00
parent 0580c10082
commit 9beb602b16

View File

@ -530,11 +530,6 @@ namespace crucible {
size_t size_t
TaskMasterState::calculate_thread_count_nolock() TaskMasterState::calculate_thread_count_nolock()
{ {
if (m_paused) {
// No threads running while paused or cancelled
return 0;
}
if (m_load_target == 0) { if (m_load_target == 0) {
// No limits, no stats, use configured thread count // No limits, no stats, use configured thread count
return m_configured_thread_max; return m_configured_thread_max;