From 0afa615d1db99f5a27459f4dc6fc8c045e55c4e6 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 5 Aug 2013 05:23:59 +0200 Subject: Impressive all of this worked so far. The Async event needs to be reset otherwise it'll always re-trigger and won't throw an EAgain, as intended. --- src/Task.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Task.cc') diff --git a/src/Task.cc b/src/Task.cc index 345d310..eb6cc7f 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -330,6 +330,8 @@ void * Balau::QueueBase::iPop(Events::Async * event, bool wait) { m_lock.leave(); Task::operationYield(event, Task::INTERRUPTIBLE); m_lock.enter(); + if (event->gotSignal()) + event->reset(); } else { pthread_cond_wait(&m_cond, &m_lock.m_lock); } -- cgit v1.2.3