# | 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() { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |