diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Task.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/Task.h b/includes/Task.h index db602f0..b5f5540 100644 --- a/includes/Task.h +++ b/includes/Task.h @@ -158,6 +158,9 @@ class Task { virtual void Do() = 0; void waitFor(Events::BaseEvent * event); bool setOkayToEAgain(bool enable) { + if (m_stackless) { + AAssert(enable, "You can't make a task go not-okay-to-eagain if it's stackless."); + } bool oldValue = m_okayToEAgain; m_okayToEAgain = enable; return oldValue; @@ -166,6 +169,7 @@ class Task { AAssert(m_stackless, "Can't set a task to be stackless twice"); AAssert(m_status == STARTING, "Can't set a task to be stackless after it started. status = %s", StatusToString(m_status)); m_stackless = true; + m_okayToEAgain = true; } private: static size_t stackSize() { return 64 * 1024; } |