Use a separate thread pool for checks.

Refs #5050
This commit is contained in:
Gunnar Beutner 2013-11-15 12:18:40 +01:00
parent bc4c4098f0
commit ff807dabff
2 changed files with 3 additions and 1 deletions

View File

@ -140,7 +140,7 @@ void CheckerComponent::CheckThreadProc(void)
Log(LogDebug, "checker", "Executing service check for '" + service->GetName() + "'"); Log(LogDebug, "checker", "Executing service check for '" + service->GetName() + "'");
CheckerComponent::Ptr self = GetSelf(); CheckerComponent::Ptr self = GetSelf();
Utility::QueueAsyncCallback(boost::bind(&CheckerComponent::ExecuteCheckHelper, self, service)); m_Pool.Post(boost::bind(&CheckerComponent::ExecuteCheckHelper, self, service));
lock.lock(); lock.lock();
} }

View File

@ -92,6 +92,8 @@ private:
void NextCheckChangedHandler(const Service::Ptr& service); void NextCheckChangedHandler(const Service::Ptr& service);
void RescheduleCheckTimer(void); void RescheduleCheckTimer(void);
ThreadPool m_Pool;
}; };
} }