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.128 by jsr166, Thu Dec 29 06:45:19 2016 UTC vs.
Revision 1.129 by jsr166, Thu Dec 29 07:30:28 2016 UTC

# Line 579 | Line 579 | public class LinkedTransferQueue<E> exte
579      private E xfer(E e, boolean haveData, int how, long nanos) {
580          if (haveData && (e == null))
581              throw new NullPointerException();
582        Node s = null;                        // the node to append, if needed
582  
583          restartFromHead: for (;;) {
584              for (Node h = head, p = h; p != null;) { // find & match first node
# Line 609 | Line 608 | public class LinkedTransferQueue<E> exte
608              }
609  
610              if (how != NOW) {                 // No matches available
611 <                if (s == null)
613 <                    s = new Node(e);
611 >                Node s = new Node(e);
612                  Node pred = tryAppend(s, haveData);
613                  if (pred == null)
614                      continue restartFromHead; // lost race vs opposite mode

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines