From: oan Date: Wed, 11 Sep 2019 08:04:03 +0000 (+0300) Subject: 0030959: OSD_Parallel_TBB: number of execution threads is strictly limited by the... X-Git-Tag: V7_4_0_beta~8 X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=3068c3bb6522e950ad57bf8c7a3c48302a1e1a46 0030959: OSD_Parallel_TBB: number of execution threads is strictly limited by the root scope Do not limit number of available threads by number of items processed within the root scope due to possibility of spawning of an additional threads within the subscopes. --- diff --git a/src/OSD/OSD_Parallel_TBB.cxx b/src/OSD/OSD_Parallel_TBB.cxx index 43b6ec178b..9179f8dba4 100644 --- a/src/OSD/OSD_Parallel_TBB.cxx +++ b/src/OSD/OSD_Parallel_TBB.cxx @@ -40,7 +40,7 @@ void OSD_Parallel::forEachExternal (UniversalIterator& theBegin, { const Handle(OSD_ThreadPool)& aThreadPool = OSD_ThreadPool::DefaultPool(); const Standard_Integer aNbThreads = theNbItems > 0 ? - Min (theNbItems, aThreadPool->NbDefaultThreadsToLaunch()) : -1; + aThreadPool->NbDefaultThreadsToLaunch() : -1; tbb::task_scheduler_init aScheduler (aNbThreads); tbb::parallel_for_each (theBegin, theEnd, theFunctor);