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

Comparing jsr166/src/jsr166y/Phaser.java (file contents):
Revision 1.24 by jsr166, Mon Jul 27 21:41:53 2009 UTC vs.
Revision 1.26 by jsr166, Wed Aug 5 00:54:11 2009 UTC

# Line 32 | Line 32 | import java.util.concurrent.locks.LockSu
32   * zero, and advancing when all parties reach the barrier (wrapping
33   * around to zero after reaching {@code Integer.MAX_VALUE}).
34   *
35 < * <li> Like a {@code CyclicBarrier}, a Phaser may be repeatedly
35 > * <li> Like a {@code CyclicBarrier}, a phaser may be repeatedly
36   * awaited.  Method {@link #arriveAndAwaitAdvance} has effect
37   * analogous to {@link java.util.concurrent.CyclicBarrier#await
38   * CyclicBarrier.await}.  However, phasers separate two aspects of
# Line 140 | Line 140 | import java.util.concurrent.locks.LockSu
140   *   phaser.arriveAndDeregister(); // deregister self, don't wait
141   * }}</pre>
142   *
143 < * <p> To create a set of tasks using a tree of phasers,
143 > * <p>To create a set of tasks using a tree of phasers,
144   * you could use code of the following form, assuming a
145   * Task class with a constructor accepting a phaser that
146   * it registers for upon construction:
# Line 712 | Line 712 | public class Phaser {
712       * termination state, and subsequent calls to {@link #isTerminated}
713       * will return true.
714       *
715 <     * <p> The default version returns {@code true} when the number of
715 >     * <p>The default version returns {@code true} when the number of
716       * registered parties is zero. Normally, overrides that arrange
717       * termination for other reasons should also preserve this
718       * property.
719       *
720 <     * <p> You may override this method to perform an action with side
720 >     * <p>You may override this method to perform an action with side
721       * effects visible to participating tasks, but it is in general
722       * only sensible to do so in designs where all parties register
723       * before any arrive, and all {@link #awaitAdvance} at each phase.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines