summaryrefslogtreecommitdiffstats
path: root/src/concurrent/qtconcurrentreducekernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/concurrent/qtconcurrentreducekernel.h')
-rw-r--r--src/concurrent/qtconcurrentreducekernel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h
index 8f9a938952..a98dedef2e 100644
--- a/src/concurrent/qtconcurrentreducekernel.h
+++ b/src/concurrent/qtconcurrentreducekernel.h
@@ -212,11 +212,13 @@ public:
inline bool shouldThrottle()
{
+ std::lock_guard<QMutex> locker(mutex);
return (resultsMapSize > (ReduceQueueThrottleLimit * threadCount));
}
inline bool shouldStartThread()
{
+ std::lock_guard<QMutex> locker(mutex);
return (resultsMapSize <= (ReduceQueueStartLimit * threadCount));
}
};