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