|
Sharpility
|
A Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element. More...
Public Member Functions | |
| bool | Offer (T item, TimeSpan timeout, CancellationToken cancellationToken=new CancellationToken()) |
| Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available. | |
| T | Poll (TimeSpan timeout, CancellationToken cancellationToken=new CancellationToken()) |
| Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available. | |
| T | Take () |
| Retrieves and removes the head of this queue, waiting if necessary until an element becomes available. | |
A Queue that additionally supports operations that wait for the queue to become non-empty when retrieving an element, and wait for space to become available in the queue when storing an element.
| T |
| bool Sharpility.Collections.Concurrent.BlockingQueue< T >.Offer | ( | T | item, |
| TimeSpan | timeout, | ||
| CancellationToken | cancellationToken = new CancellationToken() |
||
| ) |
Inserts the specified element into this queue, waiting up to the specified wait time if necessary for space to become available.
| item | offered element |
| timeout | how long to wait before giving up |
| cancellationToken | cancellation token |
Implemented in Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >.
| T Sharpility.Collections.Concurrent.BlockingQueue< T >.Poll | ( | TimeSpan | timeout, |
| CancellationToken | cancellationToken = new CancellationToken() |
||
| ) |
Retrieves and removes the head of this queue, waiting up to the specified wait time if necessary for an element to become available.
| timeout | how long to wait before giving up |
| cancellationToken | cancellation token |
Implemented in Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >.
| T Sharpility.Collections.Concurrent.BlockingQueue< T >.Take | ( | ) |
Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.
Implemented in Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >.