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.118 by jsr166, Wed Dec 28 02:16:48 2016 UTC vs.
Revision 1.119 by jsr166, Wed Dec 28 02:22:26 2016 UTC

# Line 568 | Line 568 | public class LinkedTransferQueue<E> exte
568              throw new NullPointerException();
569          Node s = null;                        // the node to append, if needed
570  
571 <        retry:
572 <        for (;;) {                            // restart on append race
573 <
571 >        restartFromHead: for (;;) {
572              for (Node h = head, p = h; p != null;) { // find & match first node
573                  boolean isData = p.isData;
574                  Object item = p.item;
# Line 602 | Line 600 | public class LinkedTransferQueue<E> exte
600                      s = new Node(e);
601                  Node pred = tryAppend(s, haveData);
602                  if (pred == null)
603 <                    continue retry;           // lost race vs opposite mode
603 >                    continue restartFromHead; // lost race vs opposite mode
604                  if (how != ASYNC)
605                      return awaitMatch(s, pred, e, (how == TIMED), nanos);
606              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines