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

Comparing jsr166/src/main/java/util/concurrent/LinkedBlockingDeque.java (file contents):
Revision 1.3 by jsr166, Tue Apr 26 01:17:18 2005 UTC vs.
Revision 1.4 by jsr166, Mon May 2 02:47:17 2005 UTC

# Line 454 | Line 454 | public class LinkedBlockingDeque<E>
454      }
455  
456      /**
457 <     * Returns the number of elements that this deque can ideally (in
458 <     * the absence of memory or resource constraints) accept without
457 >     * Returns the number of additional elements that this deque can ideally
458 >     * (in the absence of memory or resource constraints) accept without
459       * blocking. This is always equal to the initial capacity of this deque
460       * less the current <tt>size</tt> of this deque.
461 <     * <p>Note that you <em>cannot</em> always tell if
462 <     * an attempt to <tt>add</tt> an element will succeed by
463 <     * inspecting <tt>remainingCapacity</tt> because it may be the
464 <     * case that a waiting consumer is ready to <tt>take</tt> an
465 <     * element out of an otherwise full deque.
461 >     *
462 >     * <p>Note that you <em>cannot</em> always tell if an attempt to insert
463 >     * an element will succeed by inspecting <tt>remainingCapacity</tt>
464 >     * because it may be the case that another thread is about to
465 >     * <tt>put</tt> or <tt>take</tt> an element.
466       */
467      public int remainingCapacity() {
468          lock.lock();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines