mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Dequeue events (and do nothing with them).
This commit is contained in:
parent
6a7fdea6fd
commit
6886d5035e
@ -61,9 +61,22 @@ void Profiler::ZoneEnd( QueueZoneEnd&& data )
|
|||||||
|
|
||||||
void Profiler::Worker()
|
void Profiler::Worker()
|
||||||
{
|
{
|
||||||
|
enum { BulkSize = 32 };
|
||||||
|
moodycamel::ConsumerToken token( m_queue );
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
if( m_shutdown.load( std::memory_order_relaxed ) ) return;
|
if( m_shutdown.load( std::memory_order_relaxed ) ) return;
|
||||||
|
|
||||||
|
QueueItem item[BulkSize];
|
||||||
|
const auto sz = m_queue.try_dequeue_bulk( token, item, BulkSize );
|
||||||
|
if( sz > 0 )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user