[erlang-questions] Clean/ignore dead process messages
Zoltan Lajos Kis
Thu Aug 20 23:01:53 CEST 2009
Correct. Let's come up with a solution for the two generals' problem!
Attila Rajmund Nohl wrote:
> If the "out" message is sent after the client process died, but before
> the 'DOWN' message is received, the data is still lost.
> 2009/8/20, Zoltan Lajos Kis <kiszl@REDACTED>:
>> One way is to monitor all waiting processes in your fifo process. If the
>> process dies, you will receive a 'DOWN' message, so you can remove the
>> dead process from the remove queue.
>>> The queue still have the "out" message from the now dead process in its
>>> inbox. When the queue gets non-empty the message matches and queue sends
>>> data to dead process and data are lost.
>>> Is there a way to remove all messages from killed/dead process from
>>> process inbox?
>>> Or do you see some other way to ensure that the data are not lost?
>>> Thanks for your ideas.
>> erlang-questions mailing list. See http://www.erlang.org/faq.html
>> erlang-questions (at) erlang.org
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions