Version: $Rev$ $Date: 2008/07/02 03:29:58 $
Authors: Serge Aleynikov (saleyn@gmail.com).
multicall/2 | Send messages to pids and wait for replies. |
pmap/2 | Evaluate the MultiArgs list by calling F on each argument in
the list concurrently. |
pmap/3 | Evaluate the MultiArgs list by calling F on each argument in
the list concurrently. |
reply/2 | Send a reply back to sender. |
test/0 | |
test1/0 | |
test2/0 | |
test3/0 |
multicall(PidMsgs, Timeout :: timeout()) -> {Success, Error}
PidMsgs = [{Pid, Msg}]
Success = [OkReply]
Error = [ErrorReply]
Send messages to pids and wait for replies.
Each Pid would get a message in the form:
{{FromPid, Ref}, Msg}
and would have to reply with:
FromPid ! {{self(), Ref}, Reply}
. The function aggregates all
replies into Success
and Error
lists. The error list is in the
form: {Pid, ErrorReason}
.
pmap(F, List :: MultiArgs) -> [Reply]
F = fun(() -> Term)
MultiArgs = [Args]
Evaluate the MultiArgs
list by calling F
on each argument in
the list concurrently.
See also: pmap/3.
pmap(F, List :: MultiArgs, Timeout) -> [Reply]
F = fun((Args) -> Term)
MultiArgs = [Args]
Timeout = integer() | infinity
Evaluate the MultiArgs
list by calling F
on each argument in
the list concurrently. Same as pmap/2 but has a Timeout
option.
reply(X1 :: From, Msg :: Reply) -> ok
From = {FromPid :: pid(), Ref :: reference()}
Send a reply back to sender.
test() -> any()
test1() -> any()
test2() -> any()
test3() -> any()
Generated by EDoc