mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Use common queue clearing function.
This commit is contained in:
parent
331693d7f1
commit
a4be9b51b0
@ -1069,22 +1069,7 @@ void Profiler::Worker()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while( s_queue.try_dequeue_bulk( token, m_itemBuf, BulkSize ) > 0 ) {}
|
ClearQueues( token );
|
||||||
bool lockHeld = true;
|
|
||||||
while( !m_serialLock.try_lock() )
|
|
||||||
{
|
|
||||||
if( m_shutdownManual.load( std::memory_order_relaxed ) )
|
|
||||||
{
|
|
||||||
lockHeld = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_serialQueue.swap( m_serialDequeue );
|
|
||||||
if( lockHeld )
|
|
||||||
{
|
|
||||||
m_serialLock.unlock();
|
|
||||||
}
|
|
||||||
m_serialDequeue.clear();
|
|
||||||
|
|
||||||
m_sock = listen.Accept();
|
m_sock = listen.Accept();
|
||||||
if( m_sock )
|
if( m_sock )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user