AsyncQueue<T>.DequeueAsync Method
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)
Syntax
'Declaration
Public Function DequeueAsync ( _
cancellationToken As CancellationToken _
) As Task(Of T)
public Task<T> DequeueAsync(
CancellationToken cancellationToken
)
public:
Task<T>^ DequeueAsync(
CancellationToken cancellationToken
)
member DequeueAsync :
cancellationToken:CancellationToken -> Task<'T>
public function DequeueAsync(
cancellationToken : CancellationToken
) : Task<T>
Parameters
cancellationToken
Type: System.Threading.CancellationTokenA 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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.