mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
and just to be really sure - always make threads go through OnWaitForStop
This commit is contained in:
parent
37566e73d8
commit
7bf456c11a
2 changed files with 3 additions and 5 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,7 @@ void MsgThread::OnWaitForStop()
|
||||||
delete msg;
|
delete msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( !Killed() )
|
||||||
usleep(1000);
|
usleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue