summaryrefslogtreecommitdiff
path: root/src/Task.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Task.cc')
-rw-r--r--src/Task.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Task.cc b/src/Task.cc
index e5c971d..a47bd8b 100644
--- a/src/Task.cc
+++ b/src/Task.cc
@@ -57,7 +57,7 @@ void Balau::Task::switchTo() {
m_status = IDLE;
}
-void Balau::Task::suspend() {
+void Balau::Task::yield() {
coro_transfer(&m_ctx, &m_taskMan->m_returnContext);
}
@@ -91,3 +91,7 @@ void Balau::Events::Timeout::gotOwner(Task * task) {
void Balau::Events::Timeout::evt_cb(ev::timer & w, int revents) {
doSignal();
}
+
+void Balau::Events::Custom::gotOwner(Task * task) {
+ m_loop = task->getTaskMan()->getLoop();
+}