AsyncQueue<T>::DequeueAsync Method (CancellationToken)

 

Gets a task whose result is the element at the head of the queue.

Namespace:   Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

public:
Task<T>^ DequeueAsync(
	CancellationToken cancellationToken = null
)

Parameters

cancellationToken
Type: System.Threading::CancellationToken

A token whose cancellation signals lost interest in the item. Cancelling this token does not guarantee that the task will be canceled before it is assigned a resulting element from the head of the queue. It is the responsibility of the caller to ensure after cancellation either that the task is canceled, or that it has a result which the caller is then responsible for handling.

Return Value

Type: System.Threading.Tasks::Task<T>^

A task whose result is the head element.

Return to top
Show: