Hi, we run our Linux servers with thread sanitizer (-EnableTSan) and found there are some warnings. For example, TSAN complains about race conditions in TQueue::Deque and TQueue::Enqueue. In our case the queue is MPSC. I found there is CL35622008 which adds a condition for SPSC and moves TSAN_AFTER and TSAN_BEFORE from MPSC logic. Is that a false positive warning and would that CL help us to prevent this issue?
`Read of size 8 at 0x7b04000a0550 by thread T15:
#0 TQueue<IHttpThreadedRequest*, (EQueueMode)0>::Dequeue(IHttpThreadedRequest*&) Engine\Source/Runtime/Core/Public\Containers/Queue.h:72:25 (+0x15635c53) (BuildId: cba7d19b0c54f9a2)
#1 FHttpThread::Process(TArray<IHttpThreadedRequest*, TSizedDefaultAllocator<32>>&, TArray<IHttpThreadedRequest*, TSizedDefaultAllocator<32>>&) Engine\Source/.\Runtime/Online/HTTP/Private/HttpThread.cpp:224:30 (+0x15635c53)
#2 FHttpThread::Run() Engine\Source/.\Runtime/Online/HTTP/Private/HttpThread.cpp:130:5 (+0x15634660) (BuildId: cba7d19b0c54f9a2)
#3 FRunnableThreadPThread::Run() Engine\Source/.\Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25:24 (+0x14d661e4) (BuildId: cba7d19b0c54f9a2)
#4 FRunnableThreadPThread::_ThreadProc(void*) Engine\Source/Runtime/Core/Private\HAL/PThreadRunnableThread.h:187:15 (+0x14cfeea3) (BuildId: cba7d19b0c54f9a2)
Previous atomic write of size 8 at 0x7b04000a0550 by main thread:
#0 FClangPlatformAtomics::InterlockedExchangePtr(void* volatile*, void*) Engine\Source/Runtime/Core/Public\Clang/ClangPlatformAtomics.h:101:10 (+0x1561a901) (BuildId: cba7d19b0c54f9a2)
#1 TQueue<IHttpThreadedRequest*, (EQueueMode)0>::Enqueue(IHttpThreadedRequest* const&) Engine\Source/Runtime/Core/Public\Containers/Queue.h:124:4 (+0x1561a901)
#2 FHttpThread::AddRequest(IHttpThreadedRequest*) Engine\Source/.\Runtime/Online/HTTP/Private/HttpThread.cpp:86:22 (+0x1561a901)
#3 FHttpManager::AddThreadedRequest(TSharedRef<IHttpThreadedRequest, (ESPMode)1> const&) Engine\Source/.\Runtime/Online/HTTP/Private/HttpManager.cpp:420:10 (+0x1561a901)
#4 FCurlHttpRequest::ProcessRequest() Engine\Source/.\Runtime/Online/HTTP/Private/Curl/CurlHttp.cpp:1042:39 (+0x156178e6) (BuildId: cba7d19b0c54f9a2)`