AsyncQueue<T> Class
A thread-safe, asynchronously dequeuable queue.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
| Name | Description | |
|---|---|---|
![]() | AsyncQueue<T>() | Initializes a new instance of AsyncQueue. |
| Name | Description | |
|---|---|---|
![]() | Completion | The source of the task returned by Completion. This is lazily constructed. |
![]() | Count | Gets the number of elements currently in the queue. |
![]() | InitialCapacity | Gets the initial capacity for the queue. |
![]() | IsCompleted | Determines whether the queue has completed. |
![]() | IsEmpty | Determines whether the queue is currently empty. |
![]() | SyncRoot | Gets the synchronization object used by this queue. |
| Name | Description | |
|---|---|---|
![]() | Complete() | Signals that no further elements will be enqueued. |
![]() | DequeueAsync(CancellationToken) | Gets a task whose result is the element at the head of the queue. |
![]() | Enqueue(T) | Adds an element to the tail of the queue. |
![]() | Equals(Object) | (Inherited from Object.) |
![]() | Finalize() | (Inherited from Object.) |
![]() | GetHashCode() | (Inherited from Object.) |
![]() | GetType() | (Inherited from Object.) |
![]() | MemberwiseClone() | (Inherited from Object.) |
![]() | OnCompleted() | Occurs when the queue is completed. |
![]() | OnDequeued(T) | Occurs when a value is dequeued. |
![]() | OnEnqueued(T, Boolean) | Occurs when a value is enqueued. |
![]() | Peek() | Gets the value at the head of the queue without removing it from the queue. |
![]() | ToString() | (Inherited from Object.) |
![]() | TryDequeue(T) | Immediately dequeues the element from the head of the queue if one is available, otherwise returns without an element. |
![]() | TryDequeue(Predicate<T>, T) | Immediately dequeues the element from the head of the queue if one is available that satisfies the specified check, otherwise returns without an element. |
![]() | TryEnqueue(T) | Adds an element to the tail of the queue if it has not yet completed. |
![]() | TryPeek(T) | Gets the value at the head of the queue without removing it from the queue, if it is non-empty. |
This type is thread-safe for all members.



