diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:32:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:33:19 +0200 |
commit | 7810209ba32fcebfa90b081670595daaa5333a78 (patch) | |
tree | 98410d5cc7d9d762bbde0cb4eae8041aa6e2e542 /tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp | |
parent | 6f2eabb54e3f827ebd2b90f68144b86342933869 (diff) | |
parent | 88625709058b386ee74cca536c6c5556159c99fa (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
Diffstat (limited to 'tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp')
-rw-r--r-- | tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp index 39d17e0a24..a4eb2936b5 100644 --- a/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp +++ b/tests/auto/concurrent/qtconcurrentrun/tst_qtconcurrentrun.cpp @@ -506,17 +506,17 @@ void tst_QtConcurrentRun::recursive() int levels = 15; for (int i = 0; i < QThread::idealThreadCount(); ++i) { - count.store(0); + count.storeRelaxed(0); QThreadPool::globalInstance()->setMaxThreadCount(i); recursiveRun(levels); - QCOMPARE(count.load(), (int)std::pow(2.0, levels) - 1); + QCOMPARE(count.loadRelaxed(), (int)std::pow(2.0, levels) - 1); } for (int i = 0; i < QThread::idealThreadCount(); ++i) { - count.store(0); + count.storeRelaxed(0); QThreadPool::globalInstance()->setMaxThreadCount(i); recursiveResult(levels); - QCOMPARE(count.load(), (int)std::pow(2.0, levels) - 1); + QCOMPARE(count.loadRelaxed(), (int)std::pow(2.0, levels) - 1); } } @@ -570,7 +570,7 @@ public: static QAtomicInt cancel; void run() override { int iter = 60; - while (--iter && !cancel.load()) + while (--iter && !cancel.loadRelaxed()) QThread::currentThread()->msleep(25); } }; @@ -638,7 +638,7 @@ void tst_QtConcurrentRun::exceptions() caught = true; } - SlowTask::cancel.store(true); + SlowTask::cancel.storeRelaxed(true); QVERIFY2(caught, "did not get exception"); } |