diff options
Diffstat (limited to 'src/core/jobs')
-rw-r--r-- | src/core/jobs/qthreadpooler.cpp | 2 | ||||
-rw-r--r-- | src/core/jobs/task.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/jobs/qthreadpooler.cpp b/src/core/jobs/qthreadpooler.cpp index 0e9af58dd..a9f4e7a31 100644 --- a/src/core/jobs/qthreadpooler.cpp +++ b/src/core/jobs/qthreadpooler.cpp @@ -183,7 +183,7 @@ int QThreadPooler::currentCount() const { // The caller have to set the mutex - return m_taskCount.load(); + return m_taskCount.loadRelaxed(); } int QThreadPooler::maxThreadCount() const diff --git a/src/core/jobs/task.cpp b/src/core/jobs/task.cpp index 4291a4779..091aabfd6 100644 --- a/src/core/jobs/task.cpp +++ b/src/core/jobs/task.cpp @@ -118,7 +118,7 @@ void SyncTaskRunnable::run() m_atomicCount->deref(); // Wait for the other worker threads to be done - while (m_atomicCount->load() > 0) + while (m_atomicCount->loadRelaxed() > 0) QThread::currentThread()->yieldCurrentThread(); if (m_pooler) |