summaryrefslogtreecommitdiff
path: root/src/rabbit.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2011-10-28 16:05:37 +0100
committerSimon MacMullen <simon@rabbitmq.com>2011-10-28 16:05:37 +0100
commit2800502f568611f3d9271800834935fc825d1b86 (patch)
tree09eb28b41c94bbdb21a33c0beddfd2b538d44da1 /src/rabbit.erl
parentdac47d81cc7ed1e029071bdae9a1f3377293fcb8 (diff)
downloadrabbitmq-server-git-2800502f568611f3d9271800834935fc825d1b86.tar.gz
Surely I should inline that 'wait'.
Diffstat (limited to 'src/rabbit.erl')
-rw-r--r--src/rabbit.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl
index fe5e7f2c8e..05577a4e16 100644
--- a/src/rabbit.erl
+++ b/src/rabbit.erl
@@ -256,16 +256,14 @@ hipe_compile() ->
T1 = erlang:now(),
PidMRefs = [spawn_monitor(fun () -> hipe_compile(Ms) end)
|| Ms <- split(?HIPE_WORTHY, ?HIPE_PROCESSES)],
- wait([MRef || {_Pid, MRef} <- PidMRefs]),
+ [receive
+ {'DOWN', MRef, process, _, normal} -> ok;
+ {'DOWN', MRef, process, _, Reason} -> exit(Reason)
+ end || {_Pid, MRef} <- PidMRefs],
T2 = erlang:now(),
T = timer:now_diff(T2, T1) div 1000000,
io:format("|~n~nCompiled ~B modules in ~Bs~n", [Count, T]).
-wait(MRefs) -> [receive
- {'DOWN', MRef, process, _, normal} -> ok;
- {'DOWN', MRef, process, _, Reason} -> exit(Reason)
- end || MRef <- MRefs].
-
split(L, N) -> split0(L, [[] || _ <- lists:seq(1, N)]).
split0([], Ls) -> Ls;