ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/RecursiveAction.java
(Generate patch)

Comparing jsr166/src/jsr166y/RecursiveAction.java (file contents):
Revision 1.2 by jsr166, Mon Jul 20 21:45:06 2009 UTC vs.
Revision 1.3 by jsr166, Mon Jul 20 21:54:51 2009 UTC

# Line 8 | Line 8 | package jsr166y;
8  
9   /**
10   * Recursive resultless ForkJoinTasks. This class establishes
11 < * conventions to parameterize resultless actions as <tt>Void</tt>
12 < * ForkJoinTasks. Because <tt>null</tt> is the only valid value of
13 < * <tt>Void</tt>, methods such as join always return <tt>null</tt>
11 > * conventions to parameterize resultless actions as {@code Void}
12 > * ForkJoinTasks. Because {@code null} is the only valid value of
13 > * {@code Void}, methods such as join always return {@code null}
14   * upon completion.
15   *
16   * <p><b>Sample Usages.</b> Here is a sketch of a ForkJoin sort that
17 < * sorts a given <tt>long[]</tt> array:
17 > * sorts a given {@code long[]} array:
18   *
19   * <pre>
20   * class SortTask extends RecursiveAction {
# Line 35 | Line 35 | package jsr166y;
35   * }
36   * </pre>
37   *
38 < * You could then sort anArray by creating <tt>new SortTask(anArray, 0,
39 < * anArray.length-1) </tt> and invoking it in a ForkJoinPool.
38 > * You could then sort anArray by creating {@code new SortTask(anArray, 0,
39 > * anArray.length-1) } and invoking it in a ForkJoinPool.
40   * As a more concrete simple example, the following task increments
41   * each element of an array:
42   * <pre>
# Line 66 | Line 66 | package jsr166y;
66   * divide-and-conquer approach. Here is a class that sums the squares
67   * of each element of a double array, by subdividing out only the
68   * right-hand-sides of repeated divisions by two, and keeping track of
69 < * them with a chain of <tt>next</tt> references. It uses a dynamic
70 < * threshold based on method <tt>surplus</tt>, but counterbalances
69 > * them with a chain of {@code next} references. It uses a dynamic
70 > * threshold based on method {@code surplus}, but counterbalances
71   * potential excess partitioning by directly performing leaf actions
72   * on unstolen tasks rather than further subdividing.
73   *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines