aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_worker.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-03-29 15:06:47 +0200
committerHenrik Nord <[email protected]>2012-05-21 15:31:23 +0200
commit12b8ce08ece794e677fdd148723fbe0a707bef6f (patch)
tree9e589500617e0bb9c643b3227f36c583d03f29cf /lib/dialyzer/src/dialyzer_worker.erl
parent5c52ff6b5f10c7bd9ce06cdf607e88035c16e079 (diff)
downloadotp-12b8ce08ece794e677fdd148723fbe0a707bef6f.tar.gz
otp-12b8ce08ece794e677fdd148723fbe0a707bef6f.tar.bz2
otp-12b8ce08ece794e677fdd148723fbe0a707bef6f.zip
Anonymous SCCtoPID ETS table
Diffstat (limited to 'lib/dialyzer/src/dialyzer_worker.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_worker.erl16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/dialyzer/src/dialyzer_worker.erl b/lib/dialyzer/src/dialyzer_worker.erl
index cccf1d144b..50b2e31ed8 100644
--- a/lib/dialyzer/src/dialyzer_worker.erl
+++ b/lib/dialyzer/src/dialyzer_worker.erl
@@ -111,25 +111,27 @@ loop(running, #state{mode = Mode} = State) when
waits_more_success_typings(#state{depends_on = Depends}) ->
Depends =/= [].
-broadcast_done(#state{job = SCC, init_data = InitData}) ->
+broadcast_done(#state{job = SCC, init_data = InitData,
+ coordinator = Coordinator}) ->
RequiredBy = dialyzer_succ_typings:find_required_by(SCC, InitData),
- {Callers, Unknown} = dialyzer_coordinator:sccs_to_pids(RequiredBy),
+ {Callers, Unknown} =
+ dialyzer_coordinator:sccs_to_pids(RequiredBy, Coordinator),
send_done(Callers, SCC),
- continue_broadcast_done(Unknown, SCC).
+ continue_broadcast_done(Unknown, SCC, Coordinator).
send_done(Callers, SCC) ->
?debug("Sending ~p: ~p\n",[SCC, Callers]),
SendSTFun = fun(PID) -> PID ! {done, SCC} end,
lists:foreach(SendSTFun, Callers).
-continue_broadcast_done([], _SCC) -> ok;
-continue_broadcast_done(Rest, SCC) ->
+continue_broadcast_done([], _SCC, _Coordinator) -> ok;
+continue_broadcast_done(Rest, SCC, Coordinator) ->
%% This time limit should be greater than the time required
%% by the coordinator to spawn all processes.
timer:sleep(500),
- {Callers, Unknown} = dialyzer_coordinator:sccs_to_pids(Rest),
+ {Callers, Unknown} = dialyzer_coordinator:sccs_to_pids(Rest, Coordinator),
send_done(Callers, SCC),
- continue_broadcast_done(Unknown, SCC).
+ continue_broadcast_done(Unknown, SCC, Coordinator).
wait_for_success_typings(#state{depends_on = DependsOn} = State) ->
receive