diff options
author | Pixel <pixel@nobis-crew.org> | 2012-04-03 08:46:21 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2012-04-03 08:46:21 -0700 |
commit | 37221dc091725c6fea09181b845308ab8f26c795 (patch) | |
tree | f877eb7f70f2f9ec021fd04720d7bd0c937dbab7 /includes/TaskMan.h | |
parent | 7d5f246ae7310055d39ea13ff395d830e3c27a60 (diff) |
Reworking a bit the way the queues are working, and thus, the way the LuaTMainTask queue works.
Diffstat (limited to 'includes/TaskMan.h')
-rw-r--r-- | includes/TaskMan.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/TaskMan.h b/includes/TaskMan.h index 6a50491..088d5d7 100644 --- a/includes/TaskMan.h +++ b/includes/TaskMan.h @@ -9,12 +9,12 @@ #include <queue> #include <Threads.h> #include <Exceptions.h> +#include <Task.h> namespace gnu = __gnu_cxx; namespace Balau { -class Task; class TaskScheduler; namespace Events { @@ -35,6 +35,9 @@ class TaskMan { void stopMe(int code) { m_stopped = true; m_stopCode = code; } static Thread * createThreadedTaskMan(); bool stopped() { return m_stopped; } + template<class T> + static T * createTask(T * t, Task * stick = NULL) { TaskMan::registerTask(t, stick); return t; } + private: static void registerTask(Task * t, Task * stick); void * getStack(); @@ -62,7 +65,4 @@ class TaskMan { int m_stopCode; }; -template<class T> -T * createTask(T * t, Task * stick) { TaskMan::registerTask(t, stick); return t; } - }; |