ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/LinkedBlockingQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/LinkedBlockingQueue.java (file contents):
Revision 1.95 by jsr166, Tue May 26 20:20:31 2015 UTC vs.
Revision 1.96 by jsr166, Thu Jul 9 00:58:30 2015 UTC

# Line 478 | Line 478 | public class LinkedBlockingQueue<E> exte
478          final ReentrantLock takeLock = this.takeLock;
479          takeLock.lock();
480          try {
481 <            Node<E> first = head.next;
482 <            return (first == null) ? null : first.item;
481 >            return (count.get() > 0) ? head.next.item : null;
482          } finally {
483              takeLock.unlock();
484          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines