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

Allow external profiler shutdown requests.

This commit is contained in:
Bartosz Taudul
2018-08-20 01:02:27 +02:00
parent 9650162cda
commit ca939ccd19
2 changed files with 21 additions and 3 deletions
+4
View File
@@ -342,6 +342,9 @@ public:
}
#endif
void RequestShutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
bool HasShutdownFinished() const { return m_shutdownFinished.load( std::memory_order_relaxed ); }
private:
enum DequeueStatus { Success, ConnectionLost, QueueEmpty };
@@ -421,6 +424,7 @@ private:
uint64_t m_mainThread;
uint64_t m_epoch;
std::atomic<bool> m_shutdown;
std::atomic<bool> m_shutdownFinished;
Socket* m_sock;
bool m_noExit;