View Source pmap (util v1.1.5)
Link to this section Summary
Functions
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}
.Evaluate the
MultiArgs
list by calling F
on each argument in the list concurrently.See also: pmap/3.
Evaluate the
MultiArgs
list by calling F
on each argument in the list concurrently. Same as pmap/2 but has a Timeout
option.Send a reply back to sender.
Link to this section Functions
-spec multicall([{pid(), term()}], Timeout :: timeout()) ->
{[OkReply :: term()], [ErrorReply :: term()]}.
{{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}
.
-spec pmap(fun(() -> term()), [Args :: term()]) -> [Reply :: term()].
MultiArgs
list by calling F
on each argument in the list concurrently.See also: pmap/3.
-spec pmap(fun((term()) -> term()), Args :: [term()], integer() | infinity) -> [Reply :: term()].
MultiArgs
list by calling F
on each argument in the list concurrently. Same as pmap/2 but has a Timeout
option.
-spec reply({pid(), reference()}, Reply :: term()) -> ok.