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

Comparing jsr166/src/jsr166y/LinkedTransferQueue.java (file contents):
Revision 1.39 by jsr166, Fri Jul 31 20:24:30 2009 UTC vs.
Revision 1.40 by jsr166, Sat Aug 1 20:26:50 2009 UTC

# Line 522 | Line 522 | public class LinkedTransferQueue<E> exte
522      }
523  
524      /**
525 <     * Transfers the specified element immediately if there exists a
526 <     * consumer already waiting to receive it (in {@link #take} or
527 <     * timed {@link #poll(long,TimeUnit) poll}), otherwise
528 <     * returning {@code false} without enqueuing the element.
525 >     * Transfers the element to a waiting consumer immediately, if possible.
526 >     *
527 >     * <p>More precisely, transfers the specified element immediately
528 >     * if there exists a consumer already waiting to receive it (in
529 >     * {@link #take} or timed {@link #poll(long,TimeUnit) poll}),
530 >     * otherwise returning {@code false} without enqueuing the element.
531       *
532       * @throws NullPointerException if the specified element is null
533       */
# Line 535 | Line 537 | public class LinkedTransferQueue<E> exte
537      }
538  
539      /**
540 <     * Inserts the specified element at the tail of this queue,
541 <     * waiting if necessary for the element to be received by a
542 <     * consumer invoking {@code take} or {@code poll}.
540 >     * Transfers the element to a consumer, waiting if necessary to do so.
541 >     *
542 >     * <p>More precisely, transfers the specified element immediately
543 >     * if there exists a consumer already waiting to receive it (in
544 >     * {@link #take} or timed {@link #poll(long,TimeUnit) poll}),
545 >     * else inserts the specified element at the tail of this queue
546 >     * and waits until the element is received by a consumer.
547       *
548       * @throws NullPointerException if the specified element is null
549       */
# Line 550 | Line 556 | public class LinkedTransferQueue<E> exte
556      }
557  
558      /**
559 <     * Inserts the specified element at the tail of this queue,
560 <     * waiting up to the specified wait time if necessary for the
561 <     * element to be received by a consumer invoking {@code take} or
562 <     * {@code poll}.
559 >     * Transfers the element to a consumer if it is possible to do so
560 >     * before the timeout elapses.
561 >     *
562 >     * <p>More precisely, transfers the specified element immediately
563 >     * if there exists a consumer already waiting to receive it (in
564 >     * {@link #take} or timed {@link #poll(long,TimeUnit) poll}),
565 >     * else inserts the specified element at the tail of this queue
566 >     * and waits until the element is received by a consumer,
567 >     * returning {@code false} if the specified wait time elapses
568 >     * before the element can be transferred.
569       *
570       * @throws NullPointerException if the specified element is null
571       */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines