ThreadPool Class

Definition

public ref class ThreadPool abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ThreadPool final
[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)]
public static class ThreadPool
Public Class ThreadPool
Inheritance
Object Platform::Object IInspectable ThreadPool
Attributes

Windows 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