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

Comparing jsr166/src/test/loops/LinkedAsyncAction.java (file contents):
Revision 1.11 by jsr166, Mon Nov 26 11:36:33 2012 UTC vs.
Revision 1.15 by jsr166, Thu Jan 15 18:42:39 2015 UTC

# Line 40 | Line 40 | import java.util.concurrent.atomic.*;
40   * <pre>
41   * class GraphVisitor extends LinkedAsyncAction {
42   *   final Node node;
43 < *   GraphVisitor(GraphVistor parent, Node node) {
43 > *   GraphVisitor(GraphVisitor parent, Node node) {
44   *     super(parent); this.node = node;
45   *   }
46   *   protected void compute() {
# Line 69 | Line 69 | public abstract class LinkedAsyncAction
69      static final AtomicIntegerFieldUpdater<LinkedAsyncAction> controlStateUpdater =
70          AtomicIntegerFieldUpdater.newUpdater(LinkedAsyncAction.class, "controlState");
71  
72
72      /**
73       * Parent to notify on completion
74       */
# Line 157 | Line 156 | public abstract class LinkedAsyncAction
156       * default version of this method does nothing and returns
157       * {@code true}.
158       * @return true if this task's exception should be propagated to
159 <     * this task's parent.
159 >     * this task's parent
160       */
161      protected boolean onException() {
162          return true;
# Line 212 | Line 211 | public abstract class LinkedAsyncAction
211       * @param ex the exception to throw when joining this task
212       * @throws NullPointerException if ex is null
213       * @throws Throwable if any invocation of
214 <     * {@code onException} does so.
214 >     * {@code onException} does so
215       */
216      public final void completeExceptionally(Throwable ex) {
217          LinkedAsyncAction a = this;
# Line 231 | Line 230 | public abstract class LinkedAsyncAction
230  
231      /**
232       * Returns this task's parent, or null if none.
233 <     * @return this task's parent, or null if none.
233 >     * @return this task's parent, or null if none
234       */
235      public final LinkedAsyncAction getParent() {
236          return parent;
# Line 239 | Line 238 | public abstract class LinkedAsyncAction
238  
239      /**
240       * Returns the number of subtasks that have not yet completed.
241 <     * @return the number of subtasks that have not yet completed.
241 >     * @return the number of subtasks that have not yet completed
242       */
243      public final int getPendingSubtaskCount() {
244          return getControlState();
# Line 340 | Line 339 | public abstract class LinkedAsyncAction
339          controlStateUpdater.decrementAndGet(this);
340      }
341  
343
342   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines