mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 20:53:52 +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(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
const auto shouldExit = ShouldExit();
|
const auto shouldExit = ShouldExit();
|
||||||
|
|
||||||
SymbolQueueItem si;
|
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 ) )
|
if( m_symbolQueue.try_dequeue( si ) )
|
||||||
{
|
{
|
||||||
HandleSymbolQueueItem( si );
|
HandleSymbolQueueItem( si );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user