mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-13 13:58:12 +00:00
clarification
This commit is contained in:
@@ -2148,9 +2148,15 @@ void Profiler::Worker()
|
||||
while( s_symbolThreadGone.load() == false ) { YieldThread(); }
|
||||
#endif
|
||||
|
||||
// Client is exiting.
|
||||
#ifdef TRACY_HAS_SYSTEM_TRACING
|
||||
// Stop filling queues with new data.
|
||||
// On a typical shutdown scenario, the (global) Profiler object is destroyed by
|
||||
// the C++ runtime when the client program returns from "main", and ~Profiler()
|
||||
// takes care of calling StopSystemTracing(). However, a client may decide to
|
||||
// manually RequestShutdown(), in which case ~Profile() may not execute before
|
||||
// this Worker() thread goes through its teardown stages and reaches this point.
|
||||
// To ensure that system tracing does not keep pushing data to the worker queue
|
||||
// indefinitely (thus preventing this worker from terminating), we have to call
|
||||
// StopSystemTracing() here as well to be safe:
|
||||
StopSystemTracing();
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user