1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Track connection status.

This commit is contained in:
Bartosz Taudul
2018-07-10 21:50:00 +02:00
parent 010b19946f
commit c973735b49
2 changed files with 22 additions and 0 deletions
+11
View File
@@ -287,6 +287,13 @@ public:
static bool ShouldExit();
#ifdef TRACY_ON_DEMAND
tracy_force_inline bool IsConnected()
{
return m_isConnected.load( std::memory_order_relaxed );
}
#endif
private:
enum DequeueStatus { Success, ConnectionLost, QueueEmpty };
@@ -377,6 +384,10 @@ private:
FastVector<QueueItem> m_serialQueue, m_serialDequeue;
NonRecursiveBenaphore m_serialLock;
#ifdef TRACY_ON_DEMAND
std::atomic<bool> m_isConnected;
#endif
};
};