diff options
author | Pixel <pixel@nobis-crew.org> | 2012-04-06 11:40:55 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2012-04-06 11:40:55 -0700 |
commit | f2cfa1707c713c7bb01d16f4c2c4d96803ea6793 (patch) | |
tree | a722f3ad52ec471520097c5bfbbf2ab8cb4e2603 /src/TaskMan.cc | |
parent | 7fbb819bf6f590bf2337d2277f77487ef7a5ce86 (diff) |
Making it simplier to register a task and wait for it. Also renamed createTask to registerTask, which makes way more sense.
Diffstat (limited to 'src/TaskMan.cc')
-rw-r--r-- | src/TaskMan.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/TaskMan.cc b/src/TaskMan.cc index d91581e..1695d39 100644 --- a/src/TaskMan.cc +++ b/src/TaskMan.cc @@ -331,11 +331,14 @@ int Balau::TaskMan::mainLoop() { return m_stopCode; } -void Balau::TaskMan::registerTask(Balau::Task * t, Balau::Task * stick) { +void Balau::TaskMan::iRegisterTask(Balau::Task * t, Balau::Task * stick, Events::TaskEvent * event) { if (stick) { + IAssert(!event, "inconsistent"); TaskMan * tm = stick->getTaskMan(); tm->addToPending(t); } else { + if (event) + event->attachToTask(t); s_scheduler.registerTask(t); } } |