Need parallel calls to gen_server:call, similar but different to gen_server:multi_call

Cameron Kerr ckerr@REDACTED
Thu Oct 1 00:36:55 CEST 2009


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



More information about the erlang-questions mailing list