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.15 by jsr166, Tue Feb 5 19:54:07 2013 UTC vs.
Revision 1.17 by dl, Sat Sep 12 18:11:24 2015 UTC

# Line 13 | Line 13 | import java.util.concurrent.atomic.*;
13   * have smaller stack space footprints and faster completion mechanics
14   * but higher per-task footprints. Compared to LinkedAsyncActions,
15   * BinaryAsyncActions are simpler to use and have less overhead in
16 < * typical uasges but are restricted to binary computation trees.
16 > * typical usages but are restricted to binary computation trees.
17   *
18   * <p>Upon construction, a BinaryAsyncAction does not bear any
19   * linkages. For non-root tasks, links must be established using
# Line 57 | Line 57 | import java.util.concurrent.atomic.*;
57   * </pre>
58   */
59   public abstract class BinaryAsyncAction extends ForkJoinTask<Void> {
60    private volatile int controlState;
61
62    static final AtomicIntegerFieldUpdater<BinaryAsyncAction> controlStateUpdater =
63        AtomicIntegerFieldUpdater.newUpdater(BinaryAsyncAction.class, "controlState");
60  
61      /**
62       * Parent to propagate completion; nulled after completion to
# Line 169 | Line 165 | public abstract class BinaryAsyncAction
165              a.sibling = null;
166              a.parent = null;
167              a.completeThis();
168 <            if (p == null || p.compareAndSetControlState(0, 1))
168 >            if (p == null || p.markForkJoinTask())
169                  break;
170              try {
171                  p.onComplete(a, s);
# Line 233 | Line 229 | public abstract class BinaryAsyncAction
229          super.reinitialize();
230      }
231  
232 + <<<<<<< BinaryAsyncAction.java
233 + =======
234      /**
235       * Gets the control state, which is initially zero, or negative if
236       * this task has completed or cancelled. Once negative, the value
# Line 281 | Line 279 | public abstract class BinaryAsyncAction
279      protected final void decrementControlState() {
280          controlStateUpdater.decrementAndGet(this);
281      }
282 + >>>>>>> 1.14
283  
284   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines