diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index f904115c..449f7235 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1162,7 +1162,7 @@ void Profiler::Worker() #ifdef TRACY_ON_DEMAND ClearQueues( token ); - m_isConnected.store( true, std::memory_order_relaxed ); + m_isConnected.store( true, std::memory_order_release ); #endif HandshakeStatus handshake = HandshakeWelcome; @@ -1232,7 +1232,7 @@ void Profiler::Worker() if( ShouldExit() ) break; #ifdef TRACY_ON_DEMAND - m_isConnected.store( false, std::memory_order_relaxed ); + m_isConnected.store( false, std::memory_order_release ); #endif m_sock->~Socket(); diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 8891a277..ae9fa964 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -407,7 +407,7 @@ public: #ifdef TRACY_ON_DEMAND tracy_force_inline bool IsConnected() { - return m_isConnected.load( std::memory_order_relaxed ); + return m_isConnected.load( std::memory_order_acquire ); } tracy_force_inline void DeferItem( const QueueItem& item )