mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Make symbol thread exit status more robust.
This commit is contained in:
parent
048e20b68c
commit
0fc1c0f927
@ -1485,7 +1485,6 @@ Profiler::~Profiler()
|
|||||||
#ifdef TRACY_HAS_CALLSTACK
|
#ifdef TRACY_HAS_CALLSTACK
|
||||||
s_symbolThread->~Thread();
|
s_symbolThread->~Thread();
|
||||||
tracy_free( s_symbolThread );
|
tracy_free( s_symbolThread );
|
||||||
s_symbolThreadGone.store( true, std::memory_order_release );
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TRACY_NO_FRAME_IMAGE
|
#ifndef TRACY_NO_FRAME_IMAGE
|
||||||
@ -3310,7 +3309,11 @@ void Profiler::SymbolWorker()
|
|||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
if( !IsConnected() )
|
if( !IsConnected() )
|
||||||
{
|
{
|
||||||
if( shouldExit ) return;
|
if( shouldExit )
|
||||||
|
{
|
||||||
|
s_symbolThreadGone.store( true, std::memory_order_release );
|
||||||
|
return;
|
||||||
|
}
|
||||||
while( m_symbolQueue.front() ) m_symbolQueue.pop();
|
while( m_symbolQueue.front() ) m_symbolQueue.pop();
|
||||||
std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
|
std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
|
||||||
continue;
|
continue;
|
||||||
@ -3324,7 +3327,11 @@ void Profiler::SymbolWorker()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( shouldExit ) return;
|
if( shouldExit )
|
||||||
|
{
|
||||||
|
s_symbolThreadGone.store( true, std::memory_order_release );
|
||||||
|
return;
|
||||||
|
}
|
||||||
std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
|
std::this_thread::sleep_for( std::chrono::milliseconds( 20 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user