157 |
|
* default version of this method does nothing and returns |
158 |
|
* {@code true}. |
159 |
|
* @return true if this task's exception should be propagated to |
160 |
< |
* this task's parent. |
160 |
> |
* this task's parent |
161 |
|
*/ |
162 |
|
protected boolean onException() { |
163 |
|
return true; |
205 |
|
* Completes this task abnormally. Unless this task already |
206 |
|
* cancelled or aborted, upon invocation, this method invokes |
207 |
|
* {@code onException}, and then, depending on its return value, |
208 |
< |
* completees parent (if one exists) exceptionally or normally. To |
208 |
> |
* completes parent (if one exists) exceptionally or normally. To |
209 |
|
* avoid unbounded exception loops, this method aborts if an |
210 |
|
* exception is encountered in any {@code onException} |
211 |
|
* invocation. |
212 |
|
* @param ex the exception to throw when joining this task |
213 |
|
* @throws NullPointerException if ex is null |
214 |
|
* @throws Throwable if any invocation of |
215 |
< |
* {@code onException} does so. |
215 |
> |
* {@code onException} does so |
216 |
|
*/ |
217 |
|
public final void completeExceptionally(Throwable ex) { |
218 |
|
LinkedAsyncAction a = this; |
231 |
|
|
232 |
|
/** |
233 |
|
* Returns this task's parent, or null if none. |
234 |
< |
* @return this task's parent, or null if none. |
234 |
> |
* @return this task's parent, or null if none |
235 |
|
*/ |
236 |
|
public final LinkedAsyncAction getParent() { |
237 |
|
return parent; |
239 |
|
|
240 |
|
/** |
241 |
|
* Returns the number of subtasks that have not yet completed. |
242 |
< |
* @return the number of subtasks that have not yet completed. |
242 |
> |
* @return the number of subtasks that have not yet completed |
243 |
|
*/ |
244 |
|
public final int getPendingSubtaskCount() { |
245 |
|
return getControlState(); |
340 |
|
controlStateUpdater.decrementAndGet(this); |
341 |
|
} |
342 |
|
|
343 |
– |
|
343 |
|
} |