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.41 by jsr166, Fri Dec 3 01:36:25 2010 UTC vs.
Revision 1.42 by jsr166, Fri Dec 3 01:49:18 2010 UTC

# Line 511 | Line 511 | public class Phaser {
511          int phase = 0;
512          this.parent = parent;
513          if (parent != null) {
514 <            Phaser r = parent.root;
515 <            this.root = r;
516 <            this.evenQ = r.evenQ;
517 <            this.oddQ = r.oddQ;
514 >            final Phaser root = parent.root;
515 >            this.root = root;
516 >            this.evenQ = root.evenQ;
517 >            this.oddQ = root.oddQ;
518              if (parties != 0)
519                  phase = parent.doRegister(1);
520          }
# Line 523 | Line 523 | public class Phaser {
523              this.evenQ = new AtomicReference<QNode>();
524              this.oddQ = new AtomicReference<QNode>();
525          }
526 <        this.state = (parties == 0) ? ((long) EMPTY) :
526 >        this.state = (parties == 0) ? (long) EMPTY :
527              ((((long) phase) << PHASE_SHIFT) |
528               (((long) parties) << PARTIES_SHIFT) |
529               ((long) parties));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines