From 37221dc091725c6fea09181b845308ab8f26c795 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 3 Apr 2012 08:46:21 -0700 Subject: Reworking a bit the way the queues are working, and thus, the way the LuaTMainTask queue works. --- includes/TaskMan.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/TaskMan.h') 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 #include #include +#include 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 + 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 -T * createTask(T * t, Task * stick) { TaskMan::registerTask(t, stick); return t; } - }; -- cgit v1.2.3