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

Comparing jsr166/src/main/java/util/concurrent/Phaser.java (file contents):
Revision 1.19 by jsr166, Sat Nov 13 05:59:25 2010 UTC vs.
Revision 1.20 by jsr166, Sat Nov 13 08:30:15 2010 UTC

# Line 341 | Line 341 | public class Phaser {
341  
342      /**
343       * Returns message string for bounds exceptions on arrival.
344 <     * Declared out of-line from doArrive to reduce string op bulk.
344 >     * Declared out of line from doArrive to reduce string op bulk.
345       */
346      private String badArrive() {
347 <        return ("Attempted arrival of unregistered party for " +
348 <                this.toString());
347 >        return "Attempted arrival of unregistered party for " + toString();
348      }
349  
350      /**
# Line 373 | Line 372 | public class Phaser {
372      }
373  
374      /**
375 <     * Returns message string for bounds exceptions on registration
375 >     * Returns message string for out of bounds exceptions on registration.
376       */
377      private String badRegister() {
378 <        return ("Attempt to register more than " + MAX_COUNT + " parties for "+
379 <                this.toString());
378 >        return "Attempt to register more than " +
379 >            MAX_COUNT + " parties for " + toString();
380      }
381  
382      /**
# Line 770 | Line 769 | public class Phaser {
769      }
770  
771      /**
772 <     * Returns a string identifying this phaser, as well as its
773 <     * state.  The state, in brackets, includes the String {@code
774 <     * "phase = "} followed by the phase number, {@code "parties = "}
775 <     * followed by the number of registered parties, and {@code
776 <     * "arrived = "} followed by the number of arrived parties.
772 >     * Returns a string identifying this phaser, as well as its state.
773 >     * The state, in brackets, includes the String {@code "phase = "}
774 >     * followed by the phase number, {@code "parties = "} followed by
775 >     * the number of registered parties, and {@code "arrived = "}
776 >     * followed by the number of arrived parties.
777       *
778       * @return a string identifying this barrier, as well as its state
779       */
# Line 787 | Line 786 | public class Phaser {
786      }
787  
788      /**
789 <     * Removes and signals threads from queue for phase
789 >     * Removes and signals threads from queue for phase.
790       */
791      private void releaseWaiters(int phase) {
792          AtomicReference<QNode> head = queueFor(phase);
# Line 830 | Line 829 | public class Phaser {
829       * block. The value trades off good-citizenship vs big unnecessary
830       * slowdowns.
831       */
832 <    static final int SPINS_PER_ARRIVAL = NCPU < 2? 1 : 1 << 8;
832 >    static final int SPINS_PER_ARRIVAL = (NCPU < 2) ? 1 : 1 << 8;
833  
834      /**
835       * Possibly blocks and waits for phase to advance unless aborted.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines