From b8aa9ea03b992e02ab8d362598b588e79b50bfd1 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 5 Aug 2013 09:36:04 +0200 Subject: 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. --- includes/Task.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes') 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); -- cgit v1.2.3