From ff807dabff05604256d3725d7b5b1ff5c68d6edc Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 15 Nov 2013 12:18:40 +0100 Subject: [PATCH] Use a separate thread pool for checks. Refs #5050 --- components/checker/checkercomponent.cpp | 2 +- components/checker/checkercomponent.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/checker/checkercomponent.cpp b/components/checker/checkercomponent.cpp index 34921a659..63849166b 100644 --- a/components/checker/checkercomponent.cpp +++ b/components/checker/checkercomponent.cpp @@ -140,7 +140,7 @@ void CheckerComponent::CheckThreadProc(void) Log(LogDebug, "checker", "Executing service check for '" + service->GetName() + "'"); CheckerComponent::Ptr self = GetSelf(); - Utility::QueueAsyncCallback(boost::bind(&CheckerComponent::ExecuteCheckHelper, self, service)); + m_Pool.Post(boost::bind(&CheckerComponent::ExecuteCheckHelper, self, service)); lock.lock(); } diff --git a/components/checker/checkercomponent.h b/components/checker/checkercomponent.h index a3f1e69e2..5d5402f1d 100644 --- a/components/checker/checkercomponent.h +++ b/components/checker/checkercomponent.h @@ -92,6 +92,8 @@ private: void NextCheckChangedHandler(const Service::Ptr& service); void RescheduleCheckTimer(void); + + ThreadPool m_Pool; }; }