[cvs] / jsr166 / src / main / java / util / concurrent / LinkedTransferQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/concurrent/LinkedTransferQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.89, Thu Jun 11 16:23:03 2015 UTC revision 1.90, Sat Jun 13 16:52:11 2015 UTC
# Line 733  Line 733 
733    
734      /**      /**
735       * Returns the first unmatched node of the given mode, or null if       * Returns the first unmatched node of the given mode, or null if
736       * none.  Used by methods isEmpty, hasWaitingConsumer.       * none.  Used by hasWaitingConsumer.
737       */       */
738      private Node firstOfMode(boolean isData) {      private Node firstOfMode(boolean isData) {
739          for (Node p = head; p != null; p = succ(p)) {          for (Node p = head; p != null; p = succ(p)) {
# Line 1426  Line 1426 
1426       * @return {@code true} if this queue contains no elements       * @return {@code true} if this queue contains no elements
1427       */       */
1428      public boolean isEmpty() {      public boolean isEmpty() {
1429          for (Node p = head; p != null; p = succ(p)) {          return firstDataNode() == null;
             if (!p.isMatched())  
                 return !p.isData;  
         }  
         return true;  
1430      }      }
1431    
1432      public boolean hasWaitingConsumer() {      public boolean hasWaitingConsumer() {

Legend:
Removed from v.1.89  
changed lines
  Added in v.1.90

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8