diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 9ddde8d2..3282c2aa 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -73,6 +73,11 @@ Profiler* Profiler::Instance() return s_instance; } +bool Profiler::ShouldExit() +{ + return s_instance->m_shutdown.load( std::memory_order_relaxed ); +} + void Profiler::Worker() { enum { BulkSize = TargetFrameSize / QueueItemSize }; diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 61516f02..6eb0fb01 100755 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -30,6 +30,8 @@ public: static uint64_t ZoneBegin( QueueZoneBegin&& data ); static void ZoneEnd( uint64_t id, QueueZoneEnd&& data ); + static bool ShouldExit(); + private: void Worker();