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.52 by dl, Sun Feb 17 23:36:34 2013 UTC vs.
Revision 1.53 by jsr166, Mon Feb 18 01:30:24 2013 UTC

# Line 904 | Line 904 | public class LinkedTransferQueue<E> exte
904                  unsplice(lastPred, lastRet);
905          }
906      }
907 <    
907 >
908      // Very similar to ConcurrentLinkedQueue spliterator
909      static final class LTQSpliterator<E> implements Spliterator<E> {
910          static final int MAX_BATCH = 1 << 10;  // saturate batch size
# Line 912 | Line 912 | public class LinkedTransferQueue<E> exte
912          Node current;    // current node; null until initialized
913          int batch;          // batch size for splits
914          boolean exhausted;  // true when no more nodes
915 <        LTQSpliterator(LinkedTransferQueue<E> queue) {
915 >        LTQSpliterator(LinkedTransferQueue<E> queue) {
916              this.queue = queue;
917          }
918  
# Line 934 | Line 934 | public class LinkedTransferQueue<E> exte
934                  do {
935                      if ((a[i] = p.item) != null)
936                          ++i;
937 <                    if (p == (p = p.next))
937 >                    if (p == (p = p.next))
938                          p = q.firstDataNode();
939                  } while (p != null && i < n);
940                  if ((current = p) == null)
# Line 956 | Line 956 | public class LinkedTransferQueue<E> exte
956                  exhausted = true;
957                  do {
958                      Object e = p.item;
959 <                    if (p == (p = p.next))
959 >                    if (p == (p = p.next))
960                          p = q.firstDataNode();
961                      if (e != null)
962                          action.accept((E)e);
# Line 974 | Line 974 | public class LinkedTransferQueue<E> exte
974                  Object e;
975                  do {
976                      e = p.item;
977 <                    if (p == (p = p.next))
977 >                    if (p == (p = p.next))
978                          p = q.firstDataNode();
979                  } while (e == null && p != null);
980                  if ((current = p) == null)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines