mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Preventing writers/readers from receiving further messages after a
failure. Once a writer/reader Do* method has returned false, no further ones will be executed anymore. This is primarily a safety mechanism to make it easier for writer/reader authors as otherwise they would often need to track the failure state themselves (because with the now delayed termination from the earlier commit, furhter messages can now still arrive for a little bit).
This commit is contained in:
parent
86ae7d8b7c
commit
f5862fb014
8 changed files with 63 additions and 7 deletions
|
@ -154,6 +154,7 @@ MsgThread::MsgThread() : BasicThread(), queue_in(this, 0), queue_out(0, this)
|
|||
{
|
||||
cnt_sent_in = cnt_sent_out = 0;
|
||||
finished = false;
|
||||
failed = false;
|
||||
thread_mgr->AddMsgThread(this);
|
||||
}
|
||||
|
||||
|
@ -363,6 +364,7 @@ void MsgThread::Run()
|
|||
// error messages have been processed by then main
|
||||
// thread).
|
||||
SendOut(new KillMeMessage(this));
|
||||
failed = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue