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.5 by jsr166, Tue Jul 21 00:15:14 2009 UTC vs.
Revision 1.6 by jsr166, Mon Jul 27 00:01:47 2009 UTC

# Line 11 | Line 11 | import java.util.concurrent.*;
11   * A {@link BlockingQueue} in which producers may wait for consumers
12   * to receive elements.  A {@code TransferQueue} may be useful for
13   * example in message passing applications in which producers
14 < * sometimes (using method {@code transfer}) await receipt of
15 < * elements by consumers invoking {@code take} or {@code poll},
16 < * while at other times enqueue elements (via method {@code put})
17 < * without waiting for receipt. Non-blocking and time-out versions of
18 < * {@code tryTransfer} are also available.  A TransferQueue may also
19 < * be queried via {@code hasWaitingConsumer} whether there are any
20 < * threads waiting for items, which is a converse analogy to a
21 < * {@code peek} operation.
14 > * sometimes (using method {@link #transfer}) await receipt of
15 > * elements by consumers invoking {@code take} or {@code poll}, while
16 > * at other times enqueue elements (via method {@code put}) without
17 > * waiting for receipt.  {@linkplain
18 > * #tryTransfer(Object) Non-blocking} and {@linkplain
19 > * #tryTransfer(Object,long,TimeUnit) time-out} versions of {@code
20 > * tryTransfer} are also available.  A {@code TransferQueue} may also
21 > * be queried, via {@link #hasWaitingConsumer}, whether there are any
22 > * threads waiting for items, which is a converse analogy to a {@code
23 > * peek} operation.
24   *
25 < * <p>Like any {@code BlockingQueue}, a {@code TransferQueue} may be
25 > * <p>Like other blocking queues, a {@code TransferQueue} may be
26   * capacity bounded. If so, an attempted {@code transfer} operation
27   * may initially block waiting for available space, and/or
28   * subsequently block waiting for reception by a consumer.  Note that

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines