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.20 by jsr166, Mon Nov 16 01:02:49 2009 UTC vs.
Revision 1.21 by dl, Mon Apr 5 16:05:09 2010 UTC

# Line 1123 | Line 1123 | public class LinkedTransferQueue<E> exte
1123       * @return {@code true} if this queue contains no elements
1124       */
1125      public boolean isEmpty() {
1126 <        return firstOfMode(true) == null;
1126 >        for (Node p = head; p != null; p = succ(p)) {
1127 >            if (!p.isMatched())
1128 >                return !p.isData;
1129 >        }
1130 >        return true;
1131      }
1132  
1133      public boolean hasWaitingConsumer() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines