TryDequeue Method

Task Parallel System.Threading

Attempts to dequeue a Task that was previously queued to this scheduler.

Namespace:  System.Threading.Tasks
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Protected Friend Overridable Function TryDequeue ( _
	task As Task _
) As Boolean
C#
protected internal virtual bool TryDequeue(
	Task task
)

Parameters

task
Type: System.Threading.Tasks..::.Task
The Task to be dequeued.

Return Value

A Boolean denoting whether the task argument was successfully dequeued.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThe task argument is null.

See Also