TaskScheduler::QueueTask Method (Task^)

 

Queues a Task to the scheduler.

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

public protected:
[SecurityCriticalAttribute]
virtual void QueueTask(
	Task^ task
) abstract

Parameters

task
Type: System.Threading.Tasks::Task^

The Task to be queued.

Exception Condition
ArgumentNullException

The task argument is null.

A class derived from TaskScheduler implements this method to accept tasks being scheduled on the scheduler.

A typical implementation would store the task in an internal data structure, which would be serviced by threads that would execute those tasks at some time in the future.

This method is only meant to be called by the .NET Framework and should not be called directly by the derived class. This is necessary for maintaining the consistency of the system.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 5.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: