[erlang-questions] discarding signals

Masklinn <>
Wed Jun 15 00:44:14 CEST 2011


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