Represents an object that handles the low-level work of queuing tasks onto threads.
Assembly: mscorlib (in mscorlib.dll)
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Creates a System.Threading::SynchronizationContext.associated with the current
Serves as the default hash function. (Inherited from Object.)
For debugger support only, generates an enumerable of Task instances currently queued to the scheduler waiting to be executed.
Queues a Task to the scheduler.
Returns a string that represents the current object.(Inherited from Object.)
Attempts to dequeue a Task that was previously queued to this scheduler.
Attempts to execute the provided Task on this scheduler.
Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.
Occurs when a faulted task's unobserved exception is about to trigger exception escalation policy, which, by default, would terminate the process.
acts as the extension point for all pluggable scheduling logic. This includes mechanisms such as how to schedule a task for execution, and how scheduled tasks should be exposed to debuggers.
For more information and code examples, see Task Schedulers.
Several sample task schedulers are available on Code Gallery: Samples for Parallel Programming with the .NET Framework 4.
The following example is taken from the Samples for Parallel Programming with the .NET Framework 4 on the MSDN Code Gallery Web site.
Available since 4.5
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 5.0
Windows Phone Silverlight
Available since 8.0
Available since 8.1
All members of the abstracttype are thread-safe and may be used from multiple threads concurrently.