1
0
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:
Bartosz Taudul 2021-10-23 01:54:38 +02:00
parent 3d13ec7018
commit bd108220cb
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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 );