diff options
author | Pixel <Pixel> | 2001-11-15 14:52:43 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-11-15 14:52:43 +0000 |
commit | 3f720784d55707024fff675a5238fde0168d1a40 (patch) | |
tree | 84a5b9843ede69aaf76cd9b791686b2a3ea7c3d7 /lib/Task.cc | |
parent | 8694409f2a5531e9f3263e8a42248a3ca91ac14f (diff) |
More work into TaskMan...
Diffstat (limited to 'lib/Task.cc')
-rw-r--r-- | lib/Task.cc | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/Task.cc b/lib/Task.cc index 063a983..4978bde 100644 --- a/lib/Task.cc +++ b/lib/Task.cc @@ -4,7 +4,7 @@ #include "Task.h" #include "String.h" -Task::Task() : state(TASK_ON_HOLD), suspended(false), current(0) { +Task::Task() : state(TASK_ON_HOLD), suspended(false), cleanup(false), current(0) { TaskMan::AddTask(this); } Task::~Task() { @@ -64,3 +64,27 @@ void Task::WaitFor(pid_t p) { void Task::WaitFor(timeval t) { w4to.push_back(t); } + +void Task::SetBurst() { + state = TASK_BURST; +} + +void Task::SetCleanUp() { + cleanup = true; +} + +bool Task::HasToClean() { + return cleanup; +} + +void Task::Stop() { + stopped = true; +} + +void Task::Restart() { + stopped = false; +} + +bool Task::IsStopped() { + return stopped; +} |