diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp index a32f2f178a..0745b5a6e9 100644 --- a/modules/core/src/parallel.cpp +++ b/modules/core/src/parallel.cpp @@ -427,7 +427,7 @@ static inline int _initMaxThreads() { omp_set_dynamic(maxThreads); } - return numThreads; + return maxThreads; } static int numThreadsMax = _initMaxThreads(); #elif defined HAVE_GCD