diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 10 |
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; |
