diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-18 17:10:10 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-18 17:10:10 -0700 |
commit | 246feab29cf4696048628f0ad7d3d48cafe23f3b (patch) | |
tree | c03a6747e214a605d5dfe87dd13e68cecf280317 /includes | |
parent | 0db120afdfb818421dc5df3dc0946fafede78c93 (diff) |
Stopping the Task Manager when the Main Task exits, and having a switch to turn that off.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Main.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/Main.h b/includes/Main.h index 44764a3..3f81137 100644 --- a/includes/Main.h +++ b/includes/Main.h @@ -44,8 +44,13 @@ namespace Balau { class MainTask : public Task { public: + MainTask() : m_stopTaskManOnExit(true) { } + virtual ~MainTask() { if (m_stopTaskManOnExit) TaskMan::getTaskMan()->stop(); } virtual const char * getName() { return "Main Task"; } virtual void Do(); + void stopTaskManOnExit(bool v) { m_stopTaskManOnExit = v; } + private: + bool m_stopTaskManOnExit; }; class Main { |