408 |
|
*/ |
409 |
|
final long deadline = timed ? System.nanoTime() + nanos : 0L; |
410 |
|
Thread w = Thread.currentThread(); |
411 |
< |
int spins = (shouldSpin(s) ? |
412 |
< |
(timed ? maxTimedSpins : maxUntimedSpins) : 0); |
411 |
> |
int spins = shouldSpin(s) |
412 |
> |
? (timed ? maxTimedSpins : maxUntimedSpins) |
413 |
> |
: 0; |
414 |
|
for (;;) { |
415 |
|
if (w.isInterrupted()) |
416 |
|
s.tryCancel(); |
713 |
|
/* Same idea as TransferStack.awaitFulfill */ |
714 |
|
final long deadline = timed ? System.nanoTime() + nanos : 0L; |
715 |
|
Thread w = Thread.currentThread(); |
716 |
< |
int spins = ((head.next == s) ? |
717 |
< |
(timed ? maxTimedSpins : maxUntimedSpins) : 0); |
716 |
> |
int spins = (head.next == s) |
717 |
> |
? (timed ? maxTimedSpins : maxUntimedSpins) |
718 |
> |
: 0; |
719 |
|
for (;;) { |
720 |
|
if (w.isInterrupted()) |
721 |
|
s.tryCancel(e); |