aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_coordinator.erl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2012-02-20 21:29:22 +0100
committerHenrik Nord <[email protected]>2012-05-21 15:31:19 +0200
commitcf573e2ea378bae4c43007fb457dcd8379caf547 (patch)
treebe54501e4fa67462f768aaae618d13fc8523bc0c /lib/dialyzer/src/dialyzer_coordinator.erl
parenta6ab15d61cd4b36ba9d4eab7a3d290330b5c3798 (diff)
downloadotp-cf573e2ea378bae4c43007fb457dcd8379caf547.tar.gz
otp-cf573e2ea378bae4c43007fb457dcd8379caf547.tar.bz2
otp-cf573e2ea378bae4c43007fb457dcd8379caf547.zip
Simplify behaviour checking code
Diffstat (limited to 'lib/dialyzer/src/dialyzer_coordinator.erl')
-rw-r--r--lib/dialyzer/src/dialyzer_coordinator.erl14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/dialyzer/src/dialyzer_coordinator.erl b/lib/dialyzer/src/dialyzer_coordinator.erl
index 93159ce7df..437af69f5a 100644
--- a/lib/dialyzer/src/dialyzer_coordinator.erl
+++ b/lib/dialyzer/src/dialyzer_coordinator.erl
@@ -220,18 +220,20 @@ handle_cast({done, Job, NewData},
#state{mode = Mode,
spawn_count = SpawnCount,
all_spawned = AllSpawned,
- result = OldResult
+ result = OldResult,
+ job_to_pid = JobToPID
} = State) ->
- NewResult =
+ {NewResult, NewJobToPID} =
case Mode of
X when X =:= 'typesig'; X =:= 'dataflow' ->
- ordsets:union(OldResult, NewData);
+ {ordsets:union(OldResult, NewData), dict:erase(Job, JobToPID)};
'compile' ->
- dialyzer_analysis_callgraph:add_to_result(Job, NewData, OldResult);
+ {dialyzer_analysis_callgraph:add_to_result(Job, NewData, OldResult),
+ JobToPID};
'warnings' ->
- NewData ++ OldResult
+ {NewData ++ OldResult, dict:erase(Job, JobToPID)}
end,
- UpdatedState = State#state{result = NewResult},
+ UpdatedState = State#state{result = NewResult, job_to_pid = NewJobToPID},
Action =
case AllSpawned of
false -> reduce;