use SPSC queue notify/wait in the symbol queue to reduce the response latency of the symbol worker

This commit is contained in:
Marcos Slomp
2026-03-04 12:14:19 -08:00
parent eaa376be05
commit ab2c32e52f

View File

@@ -2066,6 +2066,8 @@ void Profiler::Worker()
connActive = HandleServerQuery();
if( !connActive ) break;
}
if ( !m_symbolQueue.empty() )
m_symbolQueue.notify();
if( !connActive || ShouldExit() ) break;
}
if( ShouldExit() ) break;
@@ -3657,7 +3659,7 @@ void Profiler::SymbolWorker()
s_symbolThreadGone.store( true, std::memory_order_release );
return;
}
std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
m_symbolQueue.wait( 20 );
}
}
}