mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Fix shutdown hang (resolves #160)
This commit is contained in:
parent
3d37c686cf
commit
315d25a787
@ -706,10 +706,10 @@ static void SetupSampling( int64_t& samplingPeriod )
|
|||||||
for( int i=0; i<s_numCpus; i++ ) s_ring[i].Enable();
|
for( int i=0; i<s_numCpus; i++ ) s_ring[i].Enable();
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
if( !traceActive.load( std::memory_order_relaxed ) ) break;
|
||||||
bool hadData = false;
|
bool hadData = false;
|
||||||
for( int i=0; i<s_numCpus; i++ )
|
for( int i=0; i<s_numCpus; i++ )
|
||||||
{
|
{
|
||||||
if( !traceActive.load( std::memory_order_relaxed ) ) break;
|
|
||||||
if( !s_ring[i].HasData() ) continue;
|
if( !s_ring[i].HasData() ) continue;
|
||||||
hadData = true;
|
hadData = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user