summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qtconcurrentiteratekernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentiteratekernel.h')
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.h b/src/corelib/concurrent/qtconcurrentiteratekernel.h
index c6fcb973ab..49c053caf7 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.h
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.h
@@ -214,9 +214,9 @@ public:
bool shouldStartThread()
{
if (forIteration)
- return (currentIndex < iterationCount) && !this->shouldThrottleThread();
+ return (currentIndex.load() < iterationCount) && !this->shouldThrottleThread();
else // whileIteration
- return (iteratorThreads == 0);
+ return (iteratorThreads.load() == 0);
}
ThreadFunctionResult threadFunction()
@@ -238,7 +238,7 @@ public:
const int currentBlockSize = blockSizeManager.blockSize();
- if (currentIndex >= iterationCount)
+ if (currentIndex.load() >= iterationCount)
break;
// Atomically reserve a block of iterationCount for this thread.
@@ -269,7 +269,7 @@ public:
// Report progress if progress reporting enabled.
if (progressReportingEnabled) {
completed.fetchAndAddAcquire(finalBlockSize);
- this->setProgressValue(this->completed);
+ this->setProgressValue(this->completed.load());
}
if (this->shouldThrottleThread())