ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/TransferQueue.java
(Generate patch)

Comparing jsr166/src/jsr166y/TransferQueue.java (file contents):
Revision 1.7 by jsr166, Thu Jul 30 22:45:39 2009 UTC vs.
Revision 1.8 by jsr166, Fri Jul 31 07:30:29 2009 UTC

# Line 41 | Line 41 | public interface TransferQueue<E> extend
41      /**
42       * Transfers the specified element immediately if there exists a
43       * consumer already waiting to receive it (in {@link #take} or
44 <     * timed {@link #poll(Object,long,TimeUnit) poll}), otherwise
45 <     * returning {@code false} without enqueuing the element.
44 >     * timed {@link #poll(long,TimeUnit) poll}), otherwise returning
45 >     * {@code false} without enqueuing the element.
46       *
47       * @param e the element to transfer
48       * @return {@code true} if the element was transferred, else
# Line 99 | Line 99 | public interface TransferQueue<E> extend
99      /**
100       * Returns {@code true} if there is at least one consumer waiting
101       * to receive an element via {@link #take} or
102 <     * timed {@link #poll(Object,long,TimeUnit) poll}.
102 >     * timed {@link #poll(long,TimeUnit) poll}.
103       * The return value represents a momentary state of affairs.
104       *
105       * @return {@code true} if there is at least one waiting consumer
# Line 108 | Line 108 | public interface TransferQueue<E> extend
108  
109      /**
110       * Returns an estimate of the number of consumers waiting to
111 <     * receive elements via {@link #take} or
112 <     * timed {@link #poll(Object,long,TimeUnit) poll}. The return
113 <     * value is an approximation of a momentary state of affairs, that
114 <     * may be inaccurate if consumers have completed or given up
115 <     * waiting. The value may be useful for monitoring and heuristics,
116 <     * but not for synchronization control. Implementations of this
111 >     * receive elements via {@link #take} or timed
112 >     * {@link #poll(long,TimeUnit) poll}.  The return value is an
113 >     * approximation of a momentary state of affairs, that may be
114 >     * inaccurate if consumers have completed or given up waiting.
115 >     * The value may be useful for monitoring and heuristics, but
116 >     * not for synchronization control.  Implementations of this
117       * method are likely to be noticeably slower than those for
118       * {@link #hasWaitingConsumer}.
119       *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines