From a6f79293000e96e07ab2688541fcb38225d4094f Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 29 Nov 2001 01:45:53 +0000 Subject: Night... --- lib/TaskMan.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc index 60bcdf6..f18bcf7 100644 --- a/lib/TaskMan.cc +++ b/lib/TaskMan.cc @@ -17,6 +17,7 @@ TaskMan::TaskList_t TaskMan::Zombies; vector TaskMan::w4ha; vector TaskMan::w4pr; vector TaskMan::w4to; +bool TaskMan::stopped = false; int TaskMan::number = 0; bool TaskMan::inited = false; @@ -64,6 +65,10 @@ void TaskMan::Init() throw (GeneralException) { number = 0; } +void TaskMan::Stop() { + stopped = true; +} + void TaskMan::AddTask(Task * t) { if (!inited) { Init(); @@ -140,6 +145,8 @@ void TaskMan::MainLoop() throw (GeneralException) { throw GeneralException("TaskMan: No more task to manage."); } + if (stopped) return; + // cerr << "-=- TaskMan: begin main loop with " << number << " task to manage.\n"; no_burst = 0; -- cgit v1.2.3