diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:17:13 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:17:51 +0200 |
commit | 4dac45c9ee59ff6586d90d423654da91523ab679 (patch) | |
tree | cd4a4adf2cbc9e77bf86d2d11e71ec66afdf3be4 /src/concurrent/qtconcurrentiteratekernel.h | |
parent | 078cd61751aeaa310d35a3d596a21a36004a1a0f (diff) | |
parent | f44850b5c3464cdda0ee9b1ee858d95f3ffaa3e2 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
Diffstat (limited to 'src/concurrent/qtconcurrentiteratekernel.h')
-rw-r--r-- | src/concurrent/qtconcurrentiteratekernel.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/concurrent/qtconcurrentiteratekernel.h b/src/concurrent/qtconcurrentiteratekernel.h index 89fd3d2592..3095c9ff52 100644 --- a/src/concurrent/qtconcurrentiteratekernel.h +++ b/src/concurrent/qtconcurrentiteratekernel.h @@ -206,9 +206,9 @@ public: bool shouldStartThread() override { if (forIteration) - return (currentIndex.load() < iterationCount) && !this->shouldThrottleThread(); + return (currentIndex.loadRelaxed() < iterationCount) && !this->shouldThrottleThread(); else // whileIteration - return (iteratorThreads.load() == 0); + return (iteratorThreads.loadRelaxed() == 0); } ThreadFunctionResult threadFunction() override @@ -230,7 +230,7 @@ public: const int currentBlockSize = blockSizeManager.blockSize(); - if (currentIndex.load() >= iterationCount) + if (currentIndex.loadRelaxed() >= iterationCount) break; // Atomically reserve a block of iterationCount for this thread. @@ -261,7 +261,7 @@ public: // Report progress if progress reporting enabled. if (progressReportingEnabled) { completed.fetchAndAddAcquire(finalBlockSize); - this->setProgressValue(this->completed.load()); + this->setProgressValue(this->completed.loadRelaxed()); } if (this->shouldThrottleThread()) |