Revert "Fix shutdown hang (resolves #160)"

This reverts commit 315d25a787.
This commit is contained in:
joshuakr 2021-01-21 17:21:43 -08:00
parent 315d25a787
commit 168e511de5

View File

@ -706,10 +706,10 @@ static void SetupSampling( int64_t& samplingPeriod )
for( int i=0; i<s_numCpus; i++ ) s_ring[i].Enable();
for(;;)
{
if( !traceActive.load( std::memory_order_relaxed ) ) break;
bool hadData = false;
for( int i=0; i<s_numCpus; i++ )
{
if( !traceActive.load( std::memory_order_relaxed ) ) break;
if( !s_ring[i].HasData() ) continue;
hadData = true;