mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_fiQueue.swap( m_fiDequeue );
|
if( !m_fiQueue.empty() ) m_fiQueue.swap( m_fiDequeue );
|
||||||
if( lockHeld )
|
if( lockHeld )
|
||||||
{
|
{
|
||||||
m_fiLock.unlock();
|
m_fiLock.unlock();
|
||||||
@ -1626,7 +1626,7 @@ Profiler::DequeueStatus Profiler::DequeueSerial()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_serialQueue.swap( m_serialDequeue );
|
if( !m_serialQueue.empty() ) m_serialQueue.swap( m_serialDequeue );
|
||||||
if( lockHeld )
|
if( lockHeld )
|
||||||
{
|
{
|
||||||
m_serialLock.unlock();
|
m_serialLock.unlock();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user