summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Task.h1
-rw-r--r--lib/Task.cc5
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);
+}