Module pmap

Parallel map and multicall.

Version: $Rev$ $Date: 2008/07/02 03:29:58 $

Authors: Serge Aleynikov (saleyn@gmail.com).

Description

Parallel map and multicall.

Function Index

multicall/2Send messages to pids and wait for replies.
pmap/2Evaluate the MultiArgs list by calling F on each argument in the list concurrently.
pmap/3Evaluate the MultiArgs list by calling F on each argument in the list concurrently.
reply/2Send a reply back to sender.
test/0
test1/0
test2/0
test3/0

Function Details

multicall/2

multicall(PidMsgs, Timeout :: timeout()) -> {Success, Error}

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/2

pmap(F, List :: MultiArgs) -> [Reply]

Evaluate the MultiArgs list by calling F on each argument in the list concurrently.

See also: pmap/3.

pmap/3

pmap(F, List :: MultiArgs, Timeout) -> [Reply]

Evaluate the MultiArgs list by calling F on each argument in the list concurrently. Same as pmap/2 but has a Timeout option.

reply/2

reply(X1 :: From, Msg :: Reply) -> ok

Send a reply back to sender.

test/0

test() -> any()

test1/0

test1() -> any()

test2/0

test2() -> any()

test3/0

test3() -> any()


Generated by EDoc