# | Line 675 | Line 675 | public class LinkedTransferQueue<E> exte | |
---|---|---|
675 | return itemE; | |
676 | } | |
677 | else if (w.isInterrupted() || (timed && nanos <= 0L)) { | |
678 | < | unsplice(pred, s); // try to unlink and cancel |
679 | < | if (s.casItem(e, s)) // return normally if lost CAS |
678 | > | // try to cancel and unlink |
679 | > | if (s.casItem(e, s)) { |
680 | > | unsplice(pred, s); |
681 | return e; | |
682 | + | } |
683 | + | // return normally if lost CAS |
684 | } | |
685 | else if (spins < 0) { // establish spins at/near front | |
686 | if ((spins = spinsFor(pred, s.isData)) > 0) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |