From d0419ddb2e43b1ed957108712e9bf9505d7a0c01 Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Tue, 28 Feb 2012 15:29:04 +0100 Subject: Fix race in coordinator --- lib/dialyzer/src/dialyzer_coordinator.erl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/dialyzer/src/dialyzer_coordinator.erl b/lib/dialyzer/src/dialyzer_coordinator.erl index 3663b3c737..f4f1fda8fd 100644 --- a/lib/dialyzer/src/dialyzer_coordinator.erl +++ b/lib/dialyzer/src/dialyzer_coordinator.erl @@ -152,7 +152,9 @@ send_done_to_parent(#state{mode = Mode, next_label = NextLabel}) -> Msg = case Mode of - X when X =:= 'typesig'; X =:= 'dataflow' -> {not_fixpoint, Result}; + X when X =:= 'typesig'; X =:= 'dataflow' -> + ets:delete(?MAP), + {not_fixpoint, Result}; 'compile' -> {compilation_data, Result, NextLabel}; 'warnings' -> {warnings, Result} end, @@ -340,11 +342,7 @@ handle_info(_Info, State) -> -spec terminate(term(), #state{}) -> ok. -terminate(_Reason, #state{mode = Mode}) -> - case Mode of - X when X =:= 'typesig'; X =:= 'dataflow' -> ets:delete(?MAP); - _ -> true - end, +terminate(_Reason, _State) -> ok. -spec code_change(term(), #state{}, term()) -> {ok, #state{}}. -- cgit v1.2.3