ThreadPool class
Collapse the table of content
Expand the table of content

ThreadPool class

Allows access to the thread pool. See Threading and async programming for detailed guidance on using the thread pool:

Note  The ThreadPool API is supported for desktop as well as Windows Store apps.
 

Syntax


public static class ThreadPool

Members

The ThreadPool class has these types of members:

Methods

The ThreadPool class has these methods. It also inherits methods from the Object class.

MethodDescription
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.

 

Remarks

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

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.System.Threading
Windows::System::Threading [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8

Namespace

Windows.System.Threading
Windows::System::Threading [C++]

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

See also

Object

 

 

Show:
© 2016 Microsoft