Sharpility
Sharpility.Collections.Concurrent.BlockingQueue< T > Interface Template Reference

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...

Inheritance diagram for Sharpility.Collections.Concurrent.BlockingQueue< T >:
Sharpility.Collections.IQueue< T > Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >

List of all members.

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.
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.
Take ()
 Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

Detailed Description

template<T>
interface Sharpility::Collections::Concurrent::BlockingQueue< T >

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.

Template Parameters:
T

Member Function Documentation

template<T >
bool Sharpility.Collections.Concurrent.BlockingQueue< T >.Offer ( 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.

Parameters:
itemoffered element
timeouthow long to wait before giving up
cancellationTokencancellation token
Returns:

Implemented in Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >.

template<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.

Parameters:
timeouthow long to wait before giving up
cancellationTokencancellation token
Returns:

Implemented in Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >.

Retrieves and removes the head of this queue, waiting if necessary until an element becomes available.

Returns:

Implemented in Sharpility.Collections.Concurrent.DefaultBlockingQueue< T >.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Functions Enumerations Properties