Represents an object that handles the low-level work of queuing tasks onto threads.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
In .NET Framework Client Profile, this member is overridden by Finalize().
In Portable Class Library, this member is overridden by Finalize().
|FromCurrentSynchronizationContext||Creates a associated with the current System.Threading.SynchronizationContext.|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetScheduledTasks||For debugger support only, generates an enumerable of Task instances currently queued to the scheduler waiting to be executed.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|QueueTask||Queues a Task to the scheduler.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|TryDequeue||Attempts to dequeue a Task that was previously queued to this scheduler.|
|TryExecuteTask||Attempts to execute the provided Task on this scheduler.|
|TryExecuteTaskInline||Determines whether the provided Task can be executed synchronously in this call, and if it can, executes it.|
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 HostProtectionAttribute attribute applied to this type or member has the following Resources property value: Synchronization | ExternalThreading. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.
The following example is taken from the Samples for Parallel Programming with the .NET Framework 4 on the MSDN Code Gallery Web site.
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.