System.Threading.Tasks.TaskScheduler.TryDequeue Method

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

Syntax

protected virtual bool TryDequeue (Task task)

Parameters

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

Returns

A Boolean denoting whether the task argument was successfully dequeued.

Remarks

For more information, see Task Schedulers.

This method may execute in a finally block; therefore it should return as quickly as possible so that any resources such as System.Threading.CancellationTokenRegistration objects can be disposed of in a timely manner.

Requirements

Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0