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

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

# Line 395 | Line 395 | public class ArrayBlockingQueue<E> exten
395      // this doc comment is a modified copy of the inherited doc comment,
396      // without the reference to unlimited queues.
397      /**
398 <     * Returns the number of elements that this queue can ideally (in
399 <     * the absence of memory or resource constraints) accept without
398 >     * Returns the number of additional elements that this queue can ideally
399 >     * (in the absence of memory or resource constraints) accept without
400       * blocking. This is always equal to the initial capacity of this queue
401       * less the current <tt>size</tt> of this queue.
402 <     * <p>Note that you <em>cannot</em> always tell if
403 <     * an attempt to <tt>add</tt> an element will succeed by
404 <     * inspecting <tt>remainingCapacity</tt> because it may be the
405 <     * case that a waiting consumer is ready to <tt>take</tt> an
406 <     * element out of an otherwise full queue.
402 >     *
403 >     * <p>Note that you <em>cannot</em> always tell if an attempt to insert
404 >     * an element will succeed by inspecting <tt>remainingCapacity</tt>
405 >     * because it may be the case that another thread is about to
406 >     * <tt>put</tt> or <tt>take</tt> an element.
407       */
408      public int remainingCapacity() {
409          final ReentrantLock lock = this.lock;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines