Clean/ignore dead process messages
Petr Sturc
petr.sturc@REDACTED
Thu Aug 20 15:58:26 CEST 2009
Folks,
being newbee, I am stucked with following problem:
I have a process simulating FIFO queue . You can store something by sending
"in" message {in,Data} or get data by sending "out" message. When the queue
is empty, the client gets blocked (waiting in its receive clause).
The problem happens when client dies/disconnects while waiting for the
response from the 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 other's
process inbox?
Or do you see some other way to ensure that the data are not lost?
Thanks for your ideas.
Petr
More information about the erlang-questions
mailing list