Hacker News new | past | comments | ask | show | jobs | submit login

I don't think this is true. I wrote a blocking queue implementation for the purpose of limiting the # of messages or amount of memory used by a queue.



I'll see if I can find a citation, pretty sure it was in a paper I read about optimizations in the Erlang VM's scheduler. May be a recent thing.

Edit: Here's one (http://www.haskell.org/pipermail/haskell-cafe/2006-January/0...):

"Regarding the issue of why a logger process in Erlang does not get overwhelved, this is the reply I got from Raimo Niskanen (Erlang team at Ericsson):

There is a small fix in the scheduler for the standard producer/consumer problem: A process that sends to a receiver having a large receive queue gets punished with a large reduction (number of function calls) count for the send operation, and will therefore get smaller scheduling slots."

Sending to a mailbox costs reductions proportional to how many messages are already queued. While this isn't a perfect solution, it should influence the scheduler quite a bit. (Imagine trying to do that sort of thing in node.js!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: