From 88caae135a2e6fa18c9236836dffc53bb6209b8a Mon Sep 17 00:00:00 2001 From: Jano Simas Date: Wed, 2 May 2018 16:16:43 -0300 Subject: [PATCH] limit number of analysis threads --- src/terrama2/services/analysis/core/Service.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/terrama2/services/analysis/core/Service.cpp b/src/terrama2/services/analysis/core/Service.cpp index d6020f5a2..1f5dfdbb8 100644 --- a/src/terrama2/services/analysis/core/Service.cpp +++ b/src/terrama2/services/analysis/core/Service.cpp @@ -136,7 +136,8 @@ void terrama2::services::analysis::core::Service::connectDataManager() void terrama2::services::analysis::core::Service::start(size_t threadNumber) { terrama2::core::Service::start(threadNumber); - threadPool_.reset(new ThreadPool(processingThreadPool_.size())); + threadNumber = verifyNumberOfThreads(threadNumber)/2; + threadPool_.reset(new ThreadPool(threadNumber)); } void terrama2::services::analysis::core::Service::erasePreviousResult(terrama2::core::ProcessPtr process, std::shared_ptr timestamp) const