summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-04-29 14:08:08 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-04-29 23:11:04 +0200
commit9ac7e8f4086ad536b816ce7dd7a4a0ec63655e51 (patch)
tree39626a3d6ea273cf520c8375a01d7de38eeb3535 /src/corelib
parent159ea47e2fc8ec7225db4feed3cb8926fbb93fc2 (diff)
QThread: Use storeRelease when assigning the pointer
Make it consistent with other assignments. Change-Id: If6aeb1007436e3b6a035494116786c2ab2f079ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qthread_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp
index a193595532..3e0eef411a 100644
--- a/src/corelib/thread/qthread_win.cpp
+++ b/src/corelib/thread/qthread_win.cpp
@@ -88,7 +88,7 @@ QThreadData *QThreadData::current(bool createIfNecessary)
threadData->threadId.storeRelaxed(reinterpret_cast<Qt::HANDLE>(quintptr(GetCurrentThreadId())));
if (!QCoreApplicationPrivate::theMainThreadId) {
- QCoreApplicationPrivate::theMainThread = threadData->thread.loadRelaxed();
+ QCoreApplicationPrivate::theMainThread.storeRelease(threadData->thread.loadRelaxed());
QCoreApplicationPrivate::theMainThreadId.storeRelaxed(threadData->threadId.loadRelaxed());
} else {
HANDLE realHandle = INVALID_HANDLE_VALUE;