summaryrefslogtreecommitdiff
path: root/includes/Main.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-16 17:26:28 -0800
committerPixel <pixel@nobis-crew.org>2011-11-16 17:26:28 -0800
commit1d796e6cf639354614f1152baab65d317271c357 (patch)
tree5d1e073f9d3b3c045e1c65d8ac2b658ca95a03f9 /includes/Main.h
parent2718578affdfb202450e66e6b159ff634d6b28ab (diff)
Kind of a big revamp of the TaskMan / Task model, in order to introduce a TaskScheduler.
The idea is that we need to support multiple task managers from multiple threads. So that revamp means we now should be able to support that, except the TaskScheduler needs to implement a round robin system, to distribute tasks across multiple task managers. But at least, the fundamental redesign to permit this is here.
Diffstat (limited to 'includes/Main.h')
-rw-r--r--includes/Main.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/Main.h b/includes/Main.h
index 3f81137..5fa64c1 100644
--- a/includes/Main.h
+++ b/includes/Main.h
@@ -45,7 +45,7 @@ namespace Balau {
class MainTask : public Task {
public:
MainTask() : m_stopTaskManOnExit(true) { }
- virtual ~MainTask() { if (m_stopTaskManOnExit) TaskMan::getTaskMan()->stop(); }
+ virtual ~MainTask() { if (m_stopTaskManOnExit) TaskMan::stop(); }
virtual const char * getName() { return "Main Task"; }
virtual void Do();
void stopTaskManOnExit(bool v) { m_stopTaskManOnExit = v; }
@@ -77,8 +77,8 @@ class Main {
try {
m_status = RUNNING;
- MainTask * mainTask = new MainTask();
- TaskMan::getTaskMan()->mainLoop();
+ MainTask * mainTask = createTask(new MainTask());
+ TaskMan::getDefaultTaskMan()->mainLoop();
m_status = STOPPING;
}
catch (Exit e) {