Persistate API documentation
BlockingQueue<(Of <(<'T>)>)> Class
NamespacesPersistate.UtilBlockingQueue<(Of <(<'T>)>)>

[This is preliminary documentation and is subject to change.]

Provides a blocking queue structure based on Queue.
Declaration Syntax
C#
public class BlockingQueue<T> : IEnumerable<T>, 
	ICollection, IEnumerable
Generic Template Parameters
T
The class of items held in the queue
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
BlockingQueue<(Of <(<'T>)>)>()()()()
Initializes a new instance of the BlockingQueue class that is empty and has the default initial capacity.

BlockingQueue<(Of <(<'T>)>)>(Int32)
Initializes a new instance of the BlockingQueue class that is empty and has the specified initial capacity.

Clear()()()()
Removes all objects from the BlockingQueue.

Contains(T)
Determines whether an element is in the BlockingQueue.

CopyTo(array<T>[]()[][], Int32)
Copies the BlockingQueue elements to an existing one-dimensional Array, starting at the specified array index.

CopyTo(Array, Int32)
Copies the elements of the ICollection to an Array, starting at a particular Array index.

Count
Gets the number of elements contained in the BlockingQueue.

Dequeue()()()()
Removes and returns the object at the beginning of the BlockingQueue.

Dequeue(Int32)
Removes and returns the object at the beginning of the BlockingQueue, waiting no more than a timeout period for an object to be available.

Enqueue(T)
Adds an object to the end of the BlockingQueue.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetEnumerator()()()()
Returns an enumerator that iterates through a collection.

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe). Always returns true.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Peek()()()()
Returns the object at the beginning of the BlockingQueue without removing it.

SyncRoot
Gets an object that can be used to synchronize access to the ICollection.

ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
TrimExcess()()()()
Sets the capacity to the actual number of elements in the BlockingQueue, if that number is less than 90 percent of current capacity.

TryDequeue(T%)
Attempts to obtain the object at the head of the BlockingQueue. Does not block and does not throw an exception if the queue is empty.

TryPeek(T%)
Attempts to obtain the object at the head of the BlockingQueue without removing it. Does not throw an exception if the queue is empty.

Remarks
This class provides the same functionality as queue with 3 exceptions. Firstly, it is thread safe. Secondly, Dequeue will block if the queue is empty, and will unblock only when another thread enqueues an item. Finally, two extra methods are provided, TryPeek, which does not throw an exception if the queue is empty, and TryDequeue, which neither blocks nor throws an exception when the queue is empty.
Inheritance Hierarchy
Object
BlockingQueue<(Of <(<'T>)>)>

Assembly: Persistate.Util (Module: Persistate.Util) Version: 0.6.1.20 (0.6.1.20)