diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/BLua.cc | 2 | ||||
-rw-r--r-- | src/Task.cc | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/BLua.cc b/src/BLua.cc index 7eda510..2bc726e 100644 --- a/src/BLua.cc +++ b/src/BLua.cc @@ -870,7 +870,7 @@ bool Balau::Lua::yieldC() throw (GeneralException) { Future<int> * p = (Future<int> *) touserdata(-2); if (p->m_ranOnce) - throw EAgain(p->m_evt); + Task::operationYield(p->m_evt, Task::STACKLESS); resumeC(); return yieldC(); diff --git a/src/Task.cc b/src/Task.cc index ed03532..345d310 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -301,6 +301,7 @@ void Balau::Task::operationYield(Events::BaseEvent * evt, enum OperationYieldTyp return; if ((yieldType != SIMPLE) && t->m_okayToEAgain && !gotSignal && doEAgain) { + AAssert(!t->m_cannotEAgain, "task at %p in simple context mode can't EAgain", t); Printer::elog(E_TASK, "operation is throwing an EAgain exception with event %p", evt); throw EAgain(evt); } |