From ace76b508e2f6c1bc420112306ebee52f478de13 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 18 May 2008 20:20:53 +0000 Subject: Process Crash and Process Recover Events work with the new Task maanger. --- sources/core/VSTaskManager.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'sources/core/VSTaskManager.java') diff --git a/sources/core/VSTaskManager.java b/sources/core/VSTaskManager.java index 04cff9d..6683e71 100644 --- a/sources/core/VSTaskManager.java +++ b/sources/core/VSTaskManager.java @@ -197,11 +197,17 @@ public class VSTaskManager { insert(task); } - public synchronized void removeTask(VSTask task) { - if (task.isGlobalTimed()) - globalTasks.remove(task); - else - tasks.remove(task); + public synchronized boolean removeTask(VSTask task) { + if (fullfilledProgrammedTasks.remove(task)) + return true; + + else if (task.isGlobalTimed() && globalTasks.remove(task)) + return true; + + else if (!task.isGlobalTimed() && tasks.remove(task)) + return true; + + return false; } public synchronized LinkedList getProtocolTasks(VSProtocol protocol) { -- cgit v1.2.3