374 |
|
} |
375 |
|
|
376 |
|
/** |
377 |
< |
* Returns message string for bounds exceptions on registration |
377 |
> |
* Returns message string for out of bounds exceptions on registration. |
378 |
|
*/ |
379 |
|
private String badRegister(long s) { |
380 |
|
return "Attempt to register more than " + |
382 |
|
} |
383 |
|
|
384 |
|
/** |
385 |
< |
* Recursively resolves lagged phase propagation from root if |
386 |
< |
* necessary. |
385 |
> |
* Recursively resolves lagged phase propagation from root if necessary. |
386 |
|
*/ |
387 |
|
private long reconcileState() { |
388 |
|
Phaser par = parent; |
837 |
|
* block. The value trades off good-citizenship vs big unnecessary |
838 |
|
* slowdowns. |
839 |
|
*/ |
840 |
< |
static final int SPINS_PER_ARRIVAL = NCPU < 2? 1 : 1 << 8; |
840 |
> |
static final int SPINS_PER_ARRIVAL = (NCPU < 2) ? 1 : 1 << 8; |
841 |
|
|
842 |
|
/** |
843 |
|
* Possibly blocks and waits for phase to advance unless aborted. |
844 |
|
* |
845 |
|
* @param phase current phase |
846 |
< |
* @param node if nonnull, the wait node to track interrupt and timeout; |
846 |
> |
* @param node if non-null, the wait node to track interrupt and timeout; |
847 |
|
* if null, denotes noninterruptible wait |
848 |
|
* @return current phase |
849 |
|
*/ |