AsyncQueue<T>.TryDequeue Method

Definition

Overloads

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.

TryDequeue(T)

Immediately dequeues the element from the head of the queue if one is available, otherwise returns without an element.

public:
 bool TryDequeue([Runtime::InteropServices::Out] T % value);
public bool TryDequeue (out T value);
member this.TryDequeue : 'T -> bool
Public Function TryDequeue (ByRef value As T) As Boolean

Parameters

value
T

Receives the element from the head of the queue; or default(T) if the queue is empty.

Returns

true if an element was dequeued; false if the queue was empty.

Applies to

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.

protected:
 bool TryDequeue(Predicate<T> ^ valueCheck, [Runtime::InteropServices::Out] T % value);
protected bool TryDequeue (Predicate<T> valueCheck, out T value);
member this.TryDequeue : Predicate<'T> * 'T -> bool
Protected Function TryDequeue (valueCheck As Predicate(Of T), ByRef value As T) As Boolean

Parameters

valueCheck
Predicate<T>

The test on the head element that must succeed to dequeue.

value
T

Receives the element from the head of the queue; or default(T) if the queue is empty.

Returns

true if an element was dequeued; false if the queue was empty.

Applies to