ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/LinkedTransferQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/LinkedTransferQueue.java (file contents):
Revision 1.101 by jsr166, Sat Dec 24 08:29:02 2016 UTC vs.
Revision 1.102 by jsr166, Sat Dec 24 08:44:42 2016 UTC

# 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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines