summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-04-06 11:03:57 -0700
committerPixel <pixel@nobis-crew.org>2012-04-06 11:03:57 -0700
commit64de8836d4924862d6cc352f250b802e346c29be (patch)
treee10b292b82f49f65e82a6062d811c0850019f67c /includes
parente4931a41aabe7931fe4f57835266d2a121008ce3 (diff)
Improving a bit the way threaded task managers are being stopped.
Diffstat (limited to 'includes')
-rw-r--r--includes/TaskMan.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/TaskMan.h b/includes/TaskMan.h
index 6c446b7..68aaaf6 100644
--- a/includes/TaskMan.h
+++ b/includes/TaskMan.h
@@ -47,6 +47,11 @@ class TaskMan {
r->threadStart();
return r;
}
+ static void stopThreadedTaskMan(TaskManThread * tmt) {
+ tmt->stopMe(0);
+ tmt->join();
+ delete tmt;
+ }
bool stopped() { return m_stopped; }
template<class T>
static T * createTask(T * t, Task * stick = NULL) { TaskMan::registerTask(t, stick); return t; }