diff options
author | pixel <pixel> | 2007-04-11 10:29:58 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-04-11 10:29:58 +0000 |
commit | e5a163a9f4274460f7facbf1b10914beec750775 (patch) | |
tree | b1ea93a1e0cd81b201a12170fdb7c16d6d46a046 | |
parent | 4426cc475432ec0879acaf2d5745e76a50649ee3 (diff) |
Slightly better timeout support.
-rw-r--r-- | include/Task.h | 1 | ||||
-rw-r--r-- | lib/Task.cc | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/Task.h b/include/Task.h index e18c8ed..414ffa7 100644 --- a/include/Task.h +++ b/include/Task.h @@ -49,6 +49,7 @@ class Task : public Base { void Restart(); bool IsStopped(); void RemoveFromWatches(); + void RemoveTimeout(); Handle * BurstHandle; protected: diff --git a/lib/Task.cc b/lib/Task.cc index 999881e..5a8def0 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -16,6 +16,7 @@ Task::Task() : current(0), state(TASK_ON_HOLD), stopped(false), suspended(false) Task::~Task() { TaskMan::RemoveFromWatches(this); + TaskMan::RemoveTimeout(this); } int Task::Do() throw (GeneralException) { @@ -110,3 +111,7 @@ Task * Task::WaitedBy() { void Task::RemoveFromWatches() { wbta = 0; } + +void Task::RemoveTimeout() { + TaskMan::RemoveTimeout(this); +} |