diff options
author | Nicolas Noble <pixel@nobis-crew.org> | 2013-08-01 17:15:45 -0700 |
---|---|---|
committer | Nicolas Noble <pixel@nobis-crew.org> | 2013-08-01 17:15:45 -0700 |
commit | 95ea7b338aa5d48994ba96571811c25e9d44e41a (patch) | |
tree | adf12663382ccd0359314cb5fe53953e37f83fb0 /src/Task.cc | |
parent | 48636e4f1b4fe378ac1fe20ca2c8c9a1f900e63f (diff) |
Slightly more useful debugging messages in operationYield.
Diffstat (limited to 'src/Task.cc')
-rw-r--r-- | src/Task.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Task.cc b/src/Task.cc index 77217a5..788424b 100644 --- a/src/Task.cc +++ b/src/Task.cc @@ -290,7 +290,10 @@ void Balau::Task::operationYield(Events::BaseEvent * evt, enum OperationYieldTyp "INTERRUPTIBLE", "STACKLESS", }; - Printer::elog(E_TASK, "operation back from yielding; yieldType = %s; okayToEAgain = %s", YieldTypeToString[yieldType], t->m_okayToEAgain ? "true" : "false"); + if (doEAgain) + Printer::elog(E_TASK, "operation couldn't yield; yieldType = %s; okayToEAgain = %s", YieldTypeToString[yieldType], t->m_okayToEAgain ? "true" : "false"); + else + Printer::elog(E_TASK, "operation back from yielding; yieldType = %s; okayToEAgain = %s", YieldTypeToString[yieldType], t->m_okayToEAgain ? "true" : "false"); gotSignal = evt ? evt->gotSignal() : true; } while (((yieldType == SIMPLE) || !t->m_okayToEAgain) && !gotSignal); @@ -298,7 +301,7 @@ void Balau::Task::operationYield(Events::BaseEvent * evt, enum OperationYieldTyp return; if ((yieldType != SIMPLE) && t->m_okayToEAgain && !gotSignal && doEAgain) { - Printer::elog(E_TASK, "operation is throwing an exception."); + Printer::elog(E_TASK, "operation is throwing an EAgain exception with event %p", evt); throw EAgain(evt); } } |