mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
parent
e2a7cb32e5
commit
687c88bea0
@ -253,6 +253,10 @@ void ThreadPool::ManagerThreadProc(void)
|
||||
if (alive + tthreads < 8)
|
||||
tthreads = 8 - alive;
|
||||
|
||||
/* Don't kill more than 8 threads at once. */
|
||||
if (tthreads < -8)
|
||||
tthreads = -8;
|
||||
|
||||
/* Spawn more workers if there are outstanding work items. */
|
||||
if (tthreads > 0 && pending > 0)
|
||||
tthreads = (Utility::GetTime() - Application::GetStartTime() < 300) ? 128 : 8;
|
||||
|
Loading…
x
Reference in New Issue
Block a user