pmap (util v1.3.5)
View SourceParallel map and multicall.
Luke Gorries (http://lukego.livejournal.com) (pmap) $Date: 2008/07/02 03:29:58 $
Author: Serge Aleynikov saleyn@gmail.com (multicall)
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: 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.
Functions
-spec multicall([{pid(), term()}], Timeout :: timeout()) -> {[OkReply :: term()], [ErrorReply :: term()]}.
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: 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.