[erlang-questions] Calling multiple processes simultaneously
Tue May 24 07:12:10 CEST 2011
Thanks all for the valuable feedback. Great suggestions.
On 5/24/2011 4:07 AM, Nikolas Bowe wrote:
> grab the plists module and do plists:map or plists:foreach over your pids
> with a fun that does the gen_server:call.
> plists is really handy.
> On Tue, May 24, 2011 at 2:01 AM, Martin Dimitrov <>wrote:
>> Hi, please, advise on this one,
>> We have several hundred processes (gen_servers) . At one point the
>> program has to send them a message that needs to be handled before the
>> calling process can continue executing. This naturally led us to use
>> gen_server:call in loop over the processes.
>> I started to wonder if there is a more efficient way of doing it since
>> the calling process doesn’t care about the return value – just needs to
>> be sure that all processes had handled the message. Can we somehow call
>> the processes simultaneously? Something similar to gen_server:multi_call
>> but for one node with different processes?
>> erlang-questions mailing list
More information about the erlang-questions