ThreadPool Class

Definition

public ref class ThreadPool abstract sealed
class ThreadPool abstract sealed
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.Threading.IThreadPoolStatics), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
public static class ThreadPool
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.WebHostHidden]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.Threading.IThreadPoolStatics), 65536, "Windows.Foundation.UniversalApiContract")]
public static class ThreadPool
Public Class ThreadPool
Inheritance
ThreadPool
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The ThreadPool class has only static methods, so its methods can be called without creating an instance of the class.

Methods

RunAsync(WorkItemHandler)

Creates a work item.

RunAsync(WorkItemHandler, WorkItemPriority)

Creates a work item and specifies its priority relative to other work items in the thread pool.

RunAsync(WorkItemHandler, WorkItemPriority, WorkItemOptions)

Creates a work item, specifies its priority relative to other work items in the thread pool, and specifies how long-running work items should be run.

Applies to