concurrency(?) in rpc:multicall()
Thomas Lindgren
thomasl_erlang@REDACTED
Tue Jun 27 15:09:52 CEST 2006
--- HP Wei <hp@REDACTED> wrote:
>
> According to the manual,
> "
> It is semantically the same as iteratively making
> a series
> of RPCs on all the nodes,
> but the multicall is faster as all the requests
> are sent at the same time...
> "
>
> I do NOT understand the last part:
> "
> all the requests are sent at the same time
> "
>
> I trace the source code for rpc:multicall().
> It boils down to gen_server:send_nodes(),
> whose function head reads:
> send_nodes([Node|Tail], ...)
>
> Apparently, multicall sends out the requests to the
> target processes 'one by one' (not at the same
> time).
>
>
> Is there a typo in the manual for rpc:multicall()
> ???
I think the intent of the documentation is that
multicall first sends all the requests, then only
waits for the answers after all the requests have been
sent.
Thus,
<send to A>
<send to B>
<send to C>
<wait for all A,B,C in any order>
rather than the "iterative" approach that is mentioned
in the man page:
<send to A>
<wait for A>
<send to B>
<wait for B>
<send to C>
<wait for C>
Best,
Thomas
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the erlang-questions
mailing list