# | Line 358 | Line 358 | public class Phaser { | |
---|---|---|
358 | if (unarrived <= 0) | |
359 | throw new IllegalStateException(badArrive(s)); | |
360 | if (UNSAFE.compareAndSwapLong(this, stateOffset, s, s-=adj)) { | |
361 | – | long n = s & PARTIES_MASK; // base of next state |
362 | – | int nextUnarrived = (int)n >>> PARTIES_SHIFT; |
361 | if (unarrived == 1) { | |
362 | + | long n = s & PARTIES_MASK; // base of next state |
363 | + | int nextUnarrived = (int)n >>> PARTIES_SHIFT; |
364 | if (root == this) { | |
365 | if (onAdvance(phase, nextUnarrived)) | |
366 | n |= TERMINATION_BIT; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |