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 |
|
} |
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)); |