MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ClearSerial

Method ClearSerial

Source/ThirdParty/tracy/client/TracyProfiler.cpp:2396–2416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2394}
2395
2396void Profiler::ClearSerial()
2397{
2398 bool lockHeld = true;
2399 while( !m_serialLock.try_lock() )
2400 {
2401 if( m_shutdownManual.load( std::memory_order_relaxed ) )
2402 {
2403 lockHeld = false;
2404 break;
2405 }
2406 }
2407 for( auto& v : m_serialQueue ) FreeAssociatedMemory( v );
2408 m_serialQueue.clear();
2409 if( lockHeld )
2410 {
2411 m_serialLock.unlock();
2412 }
2413
2414 for( auto& v : m_serialDequeue ) FreeAssociatedMemory( v );
2415 m_serialDequeue.clear();
2416}
2417
2418Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
2419{

Callers

nothing calls this directly

Calls 5

FreeAssociatedMemoryFunction · 0.85
try_lockMethod · 0.45
loadMethod · 0.45
clearMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected