[erlang-questions] gen_server2 merge into OTP?
Sat Jul 18 15:53:52 CEST 2009
Matthew Sackman wrote:
> The purpose of gen_server2 is a) to allow message priorities to be used;
> b) to make sure that when you do a call to another process, you don't
> risk having to scan a huge mailbox when the reply comes back because the
> mailbox is always kept small as it's constantly drained into our own
> priority queue.
Perhaps this would be a good time for someone well
versed in the implementation to expand on exactly
what's behind this:
"OTP-7979 gen_server:call/2,3 will be somewhat
faster if the calling process has a many
messages in its message queue."
(From the OTP R13B01 release notes.)
I've browsed the sources to some extent, but it's
not obvious where this optimization is done or what
CTO, Erlang Training & Consulting Ltd
More information about the erlang-questions