diff options
author | Micael Karlberg <[email protected]> | 2011-02-28 19:07:16 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-02-28 19:07:16 +0100 |
commit | 7c1117fd0e509115fb17a1a101233f19be555991 (patch) | |
tree | f0eeb2636a879bf37120b7b976ddf3979be8890d /lib/test_server/src/test_server.erl | |
parent | 2c13b770cf24be58db1862afc38143d889ac2600 (diff) | |
parent | 98d3b0c86ff3d99a4d175291df54c5ed48357fce (diff) | |
download | otp-7c1117fd0e509115fb17a1a101233f19be555991.tar.gz otp-7c1117fd0e509115fb17a1a101233f19be555991.tar.bz2 otp-7c1117fd0e509115fb17a1a101233f19be555991.zip |
Merge branch 'dev' into bmk/snmp/snmp419_integration/OTP-9068
Diffstat (limited to 'lib/test_server/src/test_server.erl')
-rw-r--r-- | lib/test_server/src/test_server.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl index e0bf50bc43..2ab4e9c28a 100644 --- a/lib/test_server/src/test_server.erl +++ b/lib/test_server/src/test_server.erl @@ -470,7 +470,7 @@ cover_analyse(Analyse,Modules) -> overview -> fun(_) -> undefined end end, - R = lists:map( + R = pmap( fun(M) -> case cover:analyse(M,module) of {ok,{M,{Cov,NotCov}}} -> @@ -486,6 +486,19 @@ cover_analyse(Analyse,Modules) -> stick_all_sticky(node(),Sticky), R. +pmap(Fun,List) -> + Collector = self(), + Pids = lists:map(fun(E) -> + spawn(fun() -> + Collector ! {res,self(),Fun(E)} + end) + end, List), + lists:map(fun(Pid) -> + receive + {res,Pid,Res} -> + Res + end + end, Pids). unstick_all_sticky(Node) -> lists:filter( |