summaryrefslogtreecommitdiffstats
path: root/src/server/RunContext.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-10-05 21:10:12 +0200
committerDavid Robillard <d@drobilla.net>2017-10-07 12:47:52 +0200
commit5f3808170d643b17c721220b926fdd51a133322c (patch)
tree06447e77068b95103b1ac427739258f60e74afa8 /src/server/RunContext.cpp
parentdbd02d57559f1a6c7a65c3235f3a3341d98850fe (diff)
downloadingen-5f3808170d643b17c721220b926fdd51a133322c.tar.gz
ingen-5f3808170d643b17c721220b926fdd51a133322c.tar.bz2
ingen-5f3808170d643b17c721220b926fdd51a133322c.zip
Remove Engine dependency from Task
Diffstat (limited to 'src/server/RunContext.cpp')
-rw-r--r--src/server/RunContext.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp
index 541f066d..b2e3f269 100644
--- a/src/server/RunContext.cpp
+++ b/src/server/RunContext.cpp
@@ -141,6 +141,20 @@ RunContext::emit_notifications(FrameTime end)
}
void
+RunContext::claim_task(Task* task)
+{
+ if ((_task = task)) {
+ _engine.signal_tasks_available();
+ }
+}
+
+Task*
+RunContext::steal_task() const
+{
+ return _engine.steal_task(_id + 1);
+}
+
+void
RunContext::set_priority(int priority)
{
if (_thread) {