diff options
author | Pixel <pixel@nobis-crew.org> | 2011-12-11 23:43:55 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-12-11 23:43:55 -0800 |
commit | bd35da4e12bae00ded027c290b1c6757334f67de (patch) | |
tree | 3402367c9058a5625cb6021dfde9cc3778d2e46d /includes | |
parent | 600e7af66ad53f83fe61a907161e8b295603b83e (diff) |
Added the ability for a task or an operation to yield. Also optimized some bits of the TaskManager.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Task.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/Task.h b/includes/Task.h index 03233f8..4617521 100644 --- a/includes/Task.h +++ b/includes/Task.h @@ -122,6 +122,7 @@ class Task { IDLE, STOPPED, FAULTED, + YIELDED, }; Task(); virtual ~Task(); @@ -136,7 +137,7 @@ class Task { TaskMan * getTaskMan() { return m_taskMan; } struct ev_loop * getLoop(); protected: - void yield(); + void yield(bool changeStatus = false); virtual void Do() = 0; void waitFor(Events::BaseEvent * event); bool setOkayToEAgain(bool enable) { |