summaryrefslogtreecommitdiff
path: root/includes/TaskMan.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/TaskMan.h')
-rw-r--r--includes/TaskMan.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/TaskMan.h b/includes/TaskMan.h
index 585fb7f..d8d0c80 100644
--- a/includes/TaskMan.h
+++ b/includes/TaskMan.h
@@ -2,6 +2,7 @@
#include <stdint.h>
#include <coro.h>
+#include <ev++.h>
#include <ext/hash_set>
#include <vector>
@@ -18,6 +19,8 @@ class TaskMan {
void mainLoop();
void stop() { m_stopped = true; }
static TaskMan * getTaskMan();
+ struct ev_loop * getLoop() { return m_loop; }
+ void signalTask(Task * t);
private:
void registerTask(Task * t);
@@ -27,9 +30,10 @@ class TaskMan {
struct taskHasher { size_t operator()(const Task * t) const { return reinterpret_cast<uintptr_t>(t); } };
typedef gnu::hash_set<Task *, taskHasher> taskHash_t;
typedef std::vector<Task *> taskList_t;
- taskHash_t m_tasks;
+ taskHash_t m_tasks, m_signaledTasks;
taskList_t m_pendingAdd;
volatile bool m_stopped;
+ struct ev_loop * m_loop;
};
};