diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-18 20:20:53 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-18 20:20:53 +0000 |
| commit | ace76b508e2f6c1bc420112306ebee52f478de13 (patch) | |
| tree | afaba5e0bbaf5a8e063e168ae478eae7f8056407 /sources/core/VSTaskManager.java | |
| parent | 5d50dcd635b9f17eb89688650860730b8e3e859f (diff) | |
Process Crash and Process Recover Events work with the new Task maanger.
Diffstat (limited to 'sources/core/VSTaskManager.java')
| -rw-r--r-- | sources/core/VSTaskManager.java | 16 |
1 files changed, 11 insertions, 5 deletions
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<VSTask> getProtocolTasks(VSProtocol protocol) { |
