mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Swap queue and dequeue only if queue has contents.
This commit is contained in:
parent
aa4ce30dff
commit
79eb1b9029
@ -1414,7 +1414,7 @@ void Profiler::CompressWorker()
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_fiQueue.swap( m_fiDequeue );
|
||||
if( !m_fiQueue.empty() ) m_fiQueue.swap( m_fiDequeue );
|
||||
if( lockHeld )
|
||||
{
|
||||
m_fiLock.unlock();
|
||||
@ -1626,7 +1626,7 @@ Profiler::DequeueStatus Profiler::DequeueSerial()
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_serialQueue.swap( m_serialDequeue );
|
||||
if( !m_serialQueue.empty() ) m_serialQueue.swap( m_serialDequeue );
|
||||
if( lockHeld )
|
||||
{
|
||||
m_serialLock.unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user