summaryrefslogtreecommitdiff
path: root/tests/test-Http.cc
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-04-06 11:40:55 -0700
committerPixel <pixel@nobis-crew.org>2012-04-06 11:40:55 -0700
commitf2cfa1707c713c7bb01d16f4c2c4d96803ea6793 (patch)
treea722f3ad52ec471520097c5bfbbf2ab8cb4e2603 /tests/test-Http.cc
parent7fbb819bf6f590bf2337d2277f77487ef7a5ce86 (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 'tests/test-Http.cc')
-rw-r--r--tests/test-Http.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test-Http.cc b/tests/test-Http.cc
index bd0ef49..f54fba0 100644
--- a/tests/test-Http.cc
+++ b/tests/test-Http.cc
@@ -118,10 +118,10 @@ void MainTask::Do() {
yield();
waitFor(&event);
- Task * stopper = new Stopper;
- Events::TaskEvent stopperEvent(stopper);
+
+ Events::TaskEvent stopperEvent;
+ Task * stopper = TaskMan::registerTask(new Stopper, &stopperEvent);
waitFor(&stopperEvent);
- TaskMan::createTask(stopper);
bool gotEvent = false, gotStopperEvent = false;
int count = 0;