and just to be really sure - always make threads go through OnWaitForStop

This commit is contained in:
Bernhard Amann 2013-05-15 15:55:38 -07:00
parent 37566e73d8
commit 7bf456c11a
2 changed files with 3 additions and 5 deletions

View file

@ -135,10 +135,7 @@ void BasicThread::WaitForStop()
if ( ! started ) if ( ! started )
return; return;
if ( terminating ) DBG_LOG(DBG_THREADING, "Waiting for thread %s to terminate and process last queue items...", name);
return;
DBG_LOG(DBG_THREADING, "Waiting for thread %s to terminate ...", name);
OnWaitForStop(); OnWaitForStop();

View file

@ -234,6 +234,7 @@ void MsgThread::OnWaitForStop()
delete msg; delete msg;
} }
if ( !Killed() )
usleep(1000); usleep(1000);
} }