summaryrefslogtreecommitdiffstats
path: root/src/server/Task.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-10-05 21:10:12 +0200
committerDavid Robillard <d@drobilla.net>2017-12-16 13:57:39 +0100
commit516552fe4f38ba82c72fe6ea32982c8a772f9088 (patch)
treee247dbc91057cecd20d6d00b622e30c19c428d2f /src/server/Task.cpp
parent4975f1e0b17cee620a58b29232867c667c24b0e3 (diff)
downloadingen-516552fe4f38ba82c72fe6ea32982c8a772f9088.tar.gz
ingen-516552fe4f38ba82c72fe6ea32982c8a772f9088.tar.bz2
ingen-516552fe4f38ba82c72fe6ea32982c8a772f9088.zip
Remove Engine dependency from Task
Diffstat (limited to 'src/server/Task.cpp')
-rw-r--r--src/server/Task.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/Task.cpp b/src/server/Task.cpp
index 7f1d4327..c76c19ae 100644
--- a/src/server/Task.cpp
+++ b/src/server/Task.cpp
@@ -15,7 +15,6 @@
*/
#include "BlockImpl.hpp"
-#include "Engine.hpp"
#include "Task.hpp"
namespace Ingen {
@@ -46,14 +45,13 @@ Task::run(RunContext& context)
Task* t = steal(context);
// Allow other threads to steal sub-tasks
- context.set_task(this);
- context.engine().signal_tasks();
+ context.claim_task(this);
// Run available tasks until this task is finished
for (; t; t = get_task(context)) {
t->run(context);
}
- context.set_task(nullptr);
+ context.claim_task(nullptr);
break;
}
@@ -93,7 +91,7 @@ Task::get_task(RunContext& context)
}
// All child tasks claimed, but some are unfinished, steal a task
- if ((t = context.engine().steal_task(context.id() + 1))) {
+ if ((t = context.steal_task())) {
return t;
}