diff options
-rw-r--r-- | includes/Task.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/Task.h b/includes/Task.h index 6fa2161..a3dbb48 100644 --- a/includes/Task.h +++ b/includes/Task.h @@ -183,6 +183,12 @@ class Task { throw TaskSwitch(); } } + void yieldNoWait() throw (GeneralException) { + if (yield(true)) { + AAssert(!m_cannotEAgain, "task at %p in simple context mode can't TaskSwitch", this); + throw TaskSwitch(); + } + } virtual void Do() = 0; void waitFor(Events::BaseEvent * event); void sleep(double timeout); |