public interface BlockingQueue
GDK enhancements for BlockingQueue.
| Type Params | Return Type | Name and description |
|---|---|---|
<T> |
public BlockingQueue<T> |
leftShift(T value)Overloads the left shift operator to provide an easy way to append objects to a BlockingQueue. |
Overloads the left shift operator to provide an easy way to append objects to a BlockingQueue. In case of bounded queue the method will block till space in the queue become available
def list = new java.util.concurrent.LinkedBlockingQueue ()
list << 3 << 2 << 1
assert list.iterator().collect{it} == [3,2,1]
value - an Object to be added to the collection.