From e5a163a9f4274460f7facbf1b10914beec750775 Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 11 Apr 2007 10:29:58 +0000 Subject: Slightly better timeout support. --- include/Task.h | 1 + lib/Task.cc | 5 +++++ 2 files changed, 6 insertions(+) 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); +} -- cgit v1.2.3