93 |
|
* performs the most common form of parallel invocation: forking a set |
94 |
|
* of tasks and joining them all. |
95 |
|
* |
96 |
< |
* <p>In the most typical usages, a fork-join pair act like a a call |
96 |
> |
* <p>In the most typical usages, a fork-join pair act like a call |
97 |
|
* (fork) and return (join) from a parallel recursive function. As is |
98 |
|
* the case with other forms of recursive calls, returns (joins) |
99 |
|
* should be performed innermost-first. For example, {@code a.fork(); |
143 |
|
* use these {@code protected} methods or marks for any purpose, but |
144 |
|
* they may be of use in the construction of specialized subclasses. |
145 |
|
* For example, parallel graph traversals can use the supplied methods |
146 |
< |
* to avoid revisiting nodes/tasks that have already been |
147 |
< |
* processed. Also, completion based designs can use them to record |
148 |
< |
* that one subtask has completed. (Method names for marking are bulky |
149 |
< |
* in part to encourage definition of methods that reflect their usage |
146 |
> |
* to avoid revisiting nodes/tasks that have already been processed. |
147 |
> |
* Also, completion based designs can use them to record that one |
148 |
> |
* subtask has completed. (Method names for marking are bulky in part |
149 |
> |
* to encourage definition of methods that reflect their usage |
150 |
|
* patterns.) |
151 |
|
* |
152 |
|
* <p>Most base support methods are {@code final}, to prevent |
235 |
|
/** |
236 |
|
* Marks completion and wakes up threads waiting to join this |
237 |
|
* task, also clearing signal request bits. A specialization for |
238 |
< |
* NORMAL completion is in method doExec |
238 |
> |
* NORMAL completion is in method doExec. |
239 |
|
* |
240 |
|
* @param completion one of NORMAL, CANCELLED, EXCEPTIONAL |
241 |
|
* @return completion status on exit |