mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Drain symbols queue if on-demand and not connected.
This commit is contained in:
parent
3d13ec7018
commit
bd108220cb
@ -3144,8 +3144,16 @@ void Profiler::SymbolWorker()
|
||||
for(;;)
|
||||
{
|
||||
const auto shouldExit = ShouldExit();
|
||||
|
||||
SymbolQueueItem si;
|
||||
#ifdef TRACY_ON_DEMAND
|
||||
if( !IsConnected() )
|
||||
{
|
||||
if( shouldExit ) return;
|
||||
while( m_symbolQueue.pop() ) {}
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if( m_symbolQueue.try_dequeue( si ) )
|
||||
{
|
||||
HandleSymbolQueueItem( si );
|
||||
|
Loading…
x
Reference in New Issue
Block a user