[erlang-questions] Re: Need parallel calls to gen_server:call, similar but different to gen_server:multi_call

David Mercer dmercer@REDACTED
Thu Oct 1 16:14:53 CEST 2009

Robert Virding wrote:

> One alternative would be to use gen_server:cast
> to
> send and then handle the replies explicitly yourself.

Another alternative might be to enhance the gen_server API, adding in
gen_server:async_call/2 which returns {Node, Mref}, and gen_server:sync/1
that takes the {Node, Mref} and returns the Reply that would have been
received from gen_server:call/2.

This shouldn't be too too difficult.  In fact, you would probably then
implement gen:call using a gen:async_call followed directly by a gen:sync.

Of course, this doesn't give Cameron what he needs NOW...



More information about the erlang-questions mailing list