[erlang-questions] On selective receive (Re: eep: multiple patterns)

Gleb Peregud gleber.p@REDACTED
Tue Jun 3 11:02:40 CEST 2008


On Tue, Jun 3, 2008 at 8:28 AM, Mats Cronqvist <mats.cronqvist@REDACTED> wrote:
> Chandru wrote:
>> 2008/6/2 Mats Cronqvist <mats.cronqvist@REDACTED
>> <mailto:mats.cronqvist@REDACTED>>:
>>
>>     Ulf Wiger wrote:
>>     > I would really like to discourage people from avoiding
>>     > selective receive because it's "expensive". It can be
>>     > expensive on very large message queues, but this is
>>     > a pretty rare error condition, and fairly easily observable.
>>     >
>>
>>      i think the "issue" of how the emu deals with huge in-queues is
>>     pretty
>>     uninteresting.
>>      in my personal experience, every single time this has come up the
>>     real
>>     problem has turned out to be lack of proper flow control (typically
>>     using {active,true} sockets). having 100k messages in an in-queue
>>     is not
>>     a realistic use case.
>>      the fact that this is not, afaik, particularly well documented is of
>>     course a problem.
>>
>>
>> This is true - but if one has no prior experience of this situation,
>> it is hard to understand why a system is behaving sluggishly. What
>> will be nice is having an option, as Ulf suggested earlier, to have
>> bounded message queues (kill the process if the message queue length
>> exceeds a certain value). That way, flow control problems will be more
>> readily visible to users.
>
>  true enough.
>
>  mats
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>

> What
> will be nice is having an option, as Ulf suggested earlier, to have
> bounded message queues (kill the process if the message queue length
> exceeds a certain value).

+1

P.S. Sorry Mats for sending this only to You previously
-- 
Gleb Peregud
http://gleber.pl/

Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong



More information about the erlang-questions mailing list