QThread: Use storeRelease when assigning the pointer

Make it consistent with other assignments.

Change-Id: If6aeb1007436e3b6a035494116786c2ab2f079ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Jarek Kobus 2024-04-29 14:08:08 +02:00
parent 159ea47e2f
commit 9ac7e8f408
1 changed files with 1 additions and 1 deletions

View File

@ -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;