145 bool yielding() const { return _status == YIELDING; } |
145 bool yielding() const { return _status == YIELDING; } |
146 bool yielded() const { return _status == YIELDED; } |
146 bool yielded() const { return _status == YIELDED; } |
147 bool completed() const { return _status == COMPLETED; } |
147 bool completed() const { return _status == COMPLETED; } |
148 bool aborted() const { return _status == ABORTED; } |
148 bool aborted() const { return _status == ABORTED; } |
149 bool active() const { return _status == ACTIVE; } |
149 bool active() const { return _status == ACTIVE; } |
|
150 |
|
151 // This method configures the task for proper termination. |
|
152 // Some tasks do not have any requirements on termination |
|
153 // and may inherit this method that does nothing. Some |
|
154 // tasks do some coordination on termination and override |
|
155 // this method to implement that coordination. |
|
156 virtual void set_for_termination(uint active_workers) {} |
150 }; |
157 }; |
151 // Class YieldingWorkGang: A subclass of WorkGang. |
158 // Class YieldingWorkGang: A subclass of WorkGang. |
152 // In particular, a YieldingWorkGang is made up of |
159 // In particular, a YieldingWorkGang is made up of |
153 // YieldingGangWorkers, and provides infrastructure |
160 // YieldingGangWorkers, and provides infrastructure |
154 // supporting yielding to the "GangOverseer", |
161 // supporting yielding to the "GangOverseer", |