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.4 by jsr166, Mon Jul 20 22:40:09 2009 UTC vs.
Revision 1.7 by jsr166, Mon Jul 27 03:33:28 2009 UTC

# Line 10 | Line 10 | package jsr166y;
10   * Recursive resultless ForkJoinTasks. This class establishes
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}
13 > * type {@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
# Line 34 | Line 34 | package jsr166y;
34   *   }
35   * }}</pre>
36   *
37 < * You could then sort anArray by creating {@code new SortTask(anArray, 0,
38 < * anArray.length-1) } and invoking it in a ForkJoinPool.
39 < * As a more concrete simple example, the following task increments
40 < * each element of an array:
37 > * You could then sort {@code anArray} by creating {@code new
38 > * SortTask(anArray, 0, anArray.length-1) } and invoking it in a
39 > * ForkJoinPool.  As a more concrete simple example, the following
40 > * task increments each element of an array:
41   *  <pre> {@code
42   * class IncrementTask extends RecursiveAction {
43   *   final long[] array; final int lo; final int hi;
# Line 118 | Line 118 | package jsr166y;
118   *     result = sum;
119   *   }
120   * }}</pre>
121 + *
122 + * @since 1.7
123 + * @author Doug Lea
124   */
125   public abstract class RecursiveAction extends ForkJoinTask<Void> {
126  
# Line 127 | Line 130 | public abstract class RecursiveAction ex
130      protected abstract void compute();
131  
132      /**
133 <     * Always returns null
133 >     * Always returns null.
134       */
135      public final Void getRawResult() { return null; }
136  
# Line 137 | Line 140 | public abstract class RecursiveAction ex
140      protected final void setRawResult(Void mustBeNull) { }
141  
142      /**
143 <     * Implements execution conventions for RecursiveActions
143 >     * Implements execution conventions for RecursiveActions.
144       */
145      protected final boolean exec() {
146          compute();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines