summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread_win.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2024-04-30 10:12:34 -0700
committerThiago Macieira <thiago.macieira@intel.com>2024-05-02 20:11:44 +0000
commitb2c236792c6eaa676b2dce3d8abb4f5948957699 (patch)
treedfcebc8c0b3331bfba2cd4ba83a76b5a34b302fb /src/corelib/thread/qthread_win.cpp
parent5344f784ed27ee98d4edfb2fce91e299c303d8d1 (diff)
QThread: relax memory semantics from seq_cst on interruptionRequested
Amends a0faf9e23666d4aa26a93d6e9ebf420e71d5e6c2. Pick-to: 6.7 Change-Id: I262c3499666e4f4fbcfbfffd17cb1e141ad104d8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/thread/qthread_win.cpp')
-rw-r--r--src/corelib/thread/qthread_win.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index 3e0eef411a..74bc1d2650 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -314,7 +314,7 @@ void QThreadPrivate::finish(void *arg, bool lockAnyway) noexcept
d->running = false;
d->finished = true;
d->isInFinish = false;
- d->interruptionRequested = false;
+ d->interruptionRequested.store(false, std::memory_order_relaxed);
if (!d->waiters) {
CloseHandle(d->handle);
@@ -391,7 +391,7 @@ void QThread::start(Priority priority)
d->finished = false;
d->exited = false;
d->returnCode = 0;
- d->interruptionRequested = false;
+ d->interruptionRequested.store(false, std::memory_order_relaxed);
/*
NOTE: we create the thread in the suspended state, set the