[erlang-questions] Re: Need parallel calls to gen_server:call, similar but different to gen_server:multi_call
Thu Oct 1 03:36:38 CEST 2009
The problem is getting the right message formats for gen_server, and they
aren't really specified. One alternative would be to use gen_server:cast to
send and then handle the replies explicitly yourself.
P.S. One long, never-resolved discussion Joe and I had for many years was
whether you should have an API like is done in gen_XXX or to explicitly
specify the message protocol. Having the message protocol would allow you to
2009/10/1 Mihai Balea <>
> On Sep 30, 2009, at 7:33 PM, Steve Davis wrote:
> ...and the following is not appropriate to your needs?
>> Responses = [gen_server:call(Pid,Request) || Pid <- PidList]
> That would serialize the calls to the gen_server processes, not taking
> advantage of the parallel nature of erlang
> How about using rpc:pmap or rpc:parallel_eval?
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions