Need parallel calls to gen_server:call, similar but different to gen_server:multi_call
Thu Oct 1 01:33:28 CEST 2009
...and the following is not appropriate to your needs?
Responses = [gen_server:call(Pid,Request) || Pid <- PidList]
On Sep 30, 5:36 pm, Cameron Kerr <ck...@REDACTED> wrote:
> Hello, I'm working on a project and have a need to send a
> gen_server:call to multiple gen_servers in parallel.
> I've looked at gen_server:multi_call, but if I understand it correctly,
> it is for working with multiple nodes, not multiple processes on the
> same node. I have a list of gen_server PIDs, so would like something
> that looks like:
> gen_server:parallel_call(Pid_list, Request) -> [Response]
> Is there something like this? If not, perhaps I could just send the
> response using the '!' operator and process it using gen_server's
> handle_info, then manually receive any responses... but this seems messy.
> Many thanks,
> Cameron Kerr
> erlang-questions mailing list. Seehttp://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions