1 %%%-------------------------------------------------------------------
6 %%% Created : 10 Oct 2011 by <>
7 %%%-------------------------------------------------------------------
11 spawner(Bandwith
, Func
, List
) ->
12 mkrl_exec_host_node:start(spawner
, Bandwith
),
13 [ mkrl_exec_host_node:submit(spawner
,
18 receive {host_done
, _Pid
, Result
} ->
24 Res
= lists:foldl(fun(_
, Ac
) ->
30 mkrl_exec_host_node:stop(spawner
)
32 Error:Reason
-> io:format("Caught ~p:~p~n", [Error
, Reason
])
37 %% timer:tc(scratch, spawner, [10, fun(X) -> timer:sleep(100), X end, lists:seq(1, 20)]).