698 |
|
* |
699 |
|
* <p>This method may be overridden in subclasses, but if so, must |
700 |
|
* still ensure that these minimal properties hold. In particular, |
701 |
< |
* the cancel method itself must not throw exceptions. |
701 |
> |
* the {@code cancel} method itself must not throw exceptions. |
702 |
|
* |
703 |
|
* <p>This method is designed to be invoked by <em>other</em> |
704 |
|
* tasks. To terminate the current task, you can just return or |
727 |
|
|
728 |
|
/** |
729 |
|
* Returns the exception thrown by the base computation, or a |
730 |
< |
* CancellationException if cancelled, or null if none or if the |
731 |
< |
* method has not yet completed. |
730 |
> |
* {@code CancellationException} if cancelled, or {@code null} if |
731 |
> |
* none or if the method has not yet completed. |
732 |
|
* |
733 |
|
* @return the exception, or {@code null} if none |
734 |
|
*/ |
884 |
|
* this task, but only if reuse occurs when this task has either |
885 |
|
* never been forked, or has been forked, then completed and all |
886 |
|
* outstanding joins of this task have also completed. Effects |
887 |
< |
* under any other usage conditions are not guaranteed, and are |
888 |
< |
* discouraged. This method may be useful when executing |
887 |
> |
* under any other usage conditions are not guaranteed. |
888 |
> |
* This method may be useful when executing |
889 |
|
* pre-constructed trees of subtasks in loops. |
890 |
|
*/ |
891 |
|
public void reinitialize() { |
965 |
|
* ForkJoinTask computations (as may be determined using method |
966 |
|
* {@link #inForkJoinPool}). Attempts to invoke in other contexts |
967 |
|
* result in exceptions or errors, possibly including |
968 |
< |
* ClassCastException. * |
968 |
> |
* ClassCastException. |
969 |
|
* @return the surplus number of tasks, which may be negative |
970 |
|
*/ |
971 |
|
public static int getSurplusQueuedTaskCount() { |