diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-05 09:36:04 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-05 09:36:04 +0200 |
commit | b8aa9ea03b992e02ab8d362598b588e79b50bfd1 (patch) | |
tree | 69576d3f3056052b5669a3ab392f0c423bef5b86 | |
parent | a4312c1e04f33fd8b5f2b2649ae6aff6d31e763d (diff) |
It makes much more sense to throw TaskSwitch here instead of EAgain. The only case you'd want EAgain is when an operation is yielding.
-rw-r--r-- | includes/Task.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/Task.h b/includes/Task.h index 9539d7d..940afe3 100644 --- a/includes/Task.h +++ b/includes/Task.h @@ -179,8 +179,8 @@ class Task { protected: void yield() throw (GeneralException) { if (yield(false)) { - AAssert(!m_cannotEAgain, "task at %p in simple context mode can't EAgain", this); - throw EAgain(NULL); + AAssert(!m_cannotEAgain, "task at %p in simple context mode can't TaskSwitch", this); + throw TaskSwitch(); } } virtual void Do() = 0; @@ -204,8 +204,8 @@ class Task { void yield(Events::BaseEvent * evt) throw (GeneralException) { waitFor(evt); if (yield(false)) { - AAssert(!m_cannotEAgain, "task at %p in simple context mode can't EAgain", this); - throw EAgain(NULL); + AAssert(!m_cannotEAgain, "task at %p in simple context mode can't TaskSwitch", this); + throw TaskSwitch(); } } bool yield(bool stillRunning); |