8 |
|
|
9 |
|
/** |
10 |
|
* A {@link ForkJoinTask} with a completion action performed when |
11 |
< |
* triggered and there are no remaining pending |
12 |
< |
* actions. CountedCompleters are in general more robust in the |
11 |
> |
* triggered and there are no remaining pending actions. |
12 |
> |
* CountedCompleters are in general more robust in the |
13 |
|
* presence of subtask stalls and blockage than are other forms of |
14 |
|
* ForkJoinTasks, but are less intuitive to program. Uses of |
15 |
|
* CountedCompleter are similar to those of other completion based |
99 |
|
* improve load balancing. In the recursive case, the second of each |
100 |
|
* pair of subtasks to finish triggers completion of its parent |
101 |
|
* (because no result combination is performed, the default no-op |
102 |
< |
* implementation of method {@code onCompletion} is not overridden). A |
103 |
< |
* static utility method sets up the base task and invokes it |
102 |
> |
* implementation of method {@code onCompletion} is not overridden). |
103 |
> |
* A static utility method sets up the base task and invokes it |
104 |
|
* (here, implicitly using the {@link ForkJoinPool#commonPool()}). |
105 |
|
* |
106 |
|
* <pre> {@code |