[erlang-questions] Selective receive issue

Vlad Dumitrescu vladdu55@REDACTED
Wed Aug 6 08:44:14 CEST 2008


On Wed, Aug 6, 2008 at 01:38, Richard A. O'Keefe <ok@REDACTED> wrote:

> On 5 Aug 2008, at 6:59 pm, Vlad Dumitrescu wrote:
>> It seems to me that there is no place where I can put a '_->...;' clause
>> without creating problems. So I'd like to ask if anyone sees another way to
>> structure this that will allow rogue messages to be discarded.
> "Add another process."
> Present a Haskeller with a problem, and he starts by saying
> "I'll just define another combinator..."
> Present an Erlanger with a problem, and he starts by saying
> "I'm sure we can fix this by adding another process."

Yes, thank you. I had considered this myself in a later message in the

There is still a problem with that (albeit a small one): if tracing the
system with dbg, the traced processes get spurious 'timeout' messages
directly, regardless of any proxies trying to protect them. In this case,
it's easy to match and discard them, and they are only there in debug mode,
but there may be other cases that affect runtime performance.

> The question is whether enabling a whole new class of serious
> bugs is better or worse than requiring people to add an extra
> process.

No, it isn't. You probably noticed the smilie -- sometimes it may be useful
for a fool to throw a stone in the lake and have the wise ones retrieve it,
the result may be a step forward.

best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080806/de3c88d5/attachment.htm>

More information about the erlang-questions mailing list