680 |
|
return itemE; |
681 |
|
} |
682 |
|
else if (w.isInterrupted() || (timed && nanos <= 0)) { |
683 |
< |
unsplice(pred, s); // try to unlink and cancel |
684 |
< |
if (s.casItem(e, s)) // return normally if lost CAS |
685 |
< |
return e; |
683 |
> |
unsplice(pred, s); // try to unlink and cancel |
684 |
> |
if (s.casItem(e, s)) // return normally if lost CAS |
685 |
> |
return e; |
686 |
|
} |
687 |
< |
else if (spins < 0) { // establish spins at/near front |
687 |
> |
else if (spins < 0) { // establish spins at/near front |
688 |
|
if ((spins = spinsFor(pred, s.isData)) > 0) |
689 |
|
randomYields = ThreadLocalRandom.current(); |
690 |
|
} |