I've found in module rpc
function pmap. And I've stuck when tried to use it.
The first question - does it requires connection with other nodes, or it would performs as lists:map
if there is no connection to other nodes?
I've tried to execute pmap
without connection to other nodes, but got exception:
7> rpc:pmap( { erlang, '+' }, [], [[1,1],[2,3]] ).
** exception exit: badrpc
in function rpc:check/2 (rpc.erl, line 745)
After that - I've launched another local node and connected it with current. But still get the same error.
Please provide me how to use rpc:pmap
correctly.
Thanks
P.S. Following code works expectedly (returns result 3):
70> erlang:apply( erlang, '+', [1,2] ).
3
71> erlang:'+'(1,2).
3