[erlang-questions] discarding signals

József Bérces jozsef.berces@REDACTED
Wed Jun 15 04:02:47 CEST 2011


Actually, the real question is the performance of going through the inbox and discarding 1 by 1. 

If we are talking about an overloaded system that, for any reason, cannot tell the sender to reduce the traffic, then probably the only way to avoid a system crash is to discard the messages and notify the operators (raise an alarm, write event log, etc.) about this. So the discard shall be very quick as we are already overloaded. Do we have something for that?

-----Original Message-----
From: Masklinn [mailto:masklinn@REDACTED] 
Sent: Wednesday, June 15, 2011 5:44
To: József Bérces
Cc: erlang-questions@REDACTED
Subject: Re: [erlang-questions] discarding signals

On 2011-06-15, at 00:22 , József Bérces wrote:
> In case async signal communication, is it possible to discard the signals queuing if the process detects that it will not be able process them?
> I remember that the process info returns the signal queue length, so it is possible to set a threshold. But I did not find anything for discarding.
Any message read from a process's mailbox (via a receive statement) is removed from the mailbox. If you don't act on it, it will be discarded.

So the way to discard a message is "read it, and ignore it".

More information about the erlang-questions mailing list