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

Comparing jsr166/src/test/loops/BinaryAsyncAction.java (file contents):
Revision 1.3 by jsr166, Mon Sep 20 20:45:38 2010 UTC vs.
Revision 1.8 by jsr166, Sun Nov 25 21:37:28 2012 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < *
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import java.util.concurrent.*;
# Line 15 | Line 15 | import java.util.concurrent.atomic.*;
15   * BinaryAsyncActions are simpler to use and have less overhead in
16   * typical uasges but are restricted to binary computation trees.
17   *
18 < * <p> Upon construction, an BinaryAsyncAction does not bear any
18 > * <p>Upon construction, an BinaryAsyncAction does not bear any
19   * linkages. For non-root tasks, links must be established using
20   * method <tt>linkSubtasks</tt> before use.
21   *
22 < * <p> <b>Sample Usage.</b>  A version of Fibonacci:
22 > * <p><b>Sample Usage.</b>  A version of Fibonacci:
23   * <pre>
24   * class Fib extends BinaryAsyncAction {
25   *   final int n;
# Line 34 | Line 34 | import java.util.concurrent.atomic.*;
34   *     }
35   *   }
36   *   protected void onComplete(BinaryAsyncAction x, BinaryAsyncAction y) {
37 < *      result = ((Fib)x).result + ((Fib)y).result;
37 > *     result = ((Fib)x).result + ((Fib)y).result;
38   *   }
39   * }
40   * </pre>
# Line 101 | Line 101 | public abstract class BinaryAsyncAction
101       * Overridable callback action triggered upon <tt>complete</tt> of
102       * subtasks.  Upon invocation, both subtasks have completed.
103       * After return, this task <tt>isDone</tt> and is joinable by
104 <     * other tasks. The default version of this method does
105 <     * nothing. But it may may be overridden in subclasses to perform
106 <     * some action (for example a reduction) when this task is
107 <     * completes.
104 >     * other tasks. The default version of this method does nothing.
105 >     * But it may be overridden in subclasses to perform some action
106 >     * (for example a reduction) when this task is completes.
107       * @param x one subtask
108       * @param y the other subtask
109       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines