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

Comparing jsr166/src/jsr166y/LinkedTransferQueue.java (file contents):
Revision 1.71 by jsr166, Mon Nov 16 01:02:49 2009 UTC vs.
Revision 1.72 by dl, Mon Apr 5 15:50:51 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines