diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h index a58739fc410..a2c693d9e2e 100644 --- a/src/concurrent/qtconcurrentreducekernel.h +++ b/src/concurrent/qtconcurrentreducekernel.h @@ -187,11 +187,13 @@ public: inline bool shouldThrottle() { + std::lock_guard locker(mutex); return (resultsMapSize > (ReduceQueueThrottleLimit * threadCount)); } inline bool shouldStartThread() { + std::lock_guard locker(mutex); return (resultsMapSize <= (ReduceQueueStartLimit * threadCount)); } };