ThreadPool ThreadPool ThreadPool Class

Syntax

Declaration

public static class ThreadPoolpublic static class ThreadPoolPublic Static Class ThreadPool

Remarks

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

Methods summary

Creates a work item.

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

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.

Methods

  • RunAsync(WorkItemHandler)
    RunAsync(WorkItemHandler)
    RunAsync(WorkItemHandler)
    RunAsync(WorkItemHandler)

    Creates a work item.

    public static IAsyncAction RunAsync(WorkItemHandler handler)public static IAsyncAction RunAsync(WorkItemHandler handler)Public Static Function RunAsync(handler As WorkItemHandler) As IAsyncActionpublic static IAsyncAction RunAsync(WorkItemHandler handler)

    Parameters

    Returns

  • RunAsync(WorkItemHandler, WorkItemPriority)
    RunAsync(WorkItemHandler, WorkItemPriority)
    RunAsync(WorkItemHandler, WorkItemPriority)
    RunAsync(WorkItemHandler, WorkItemPriority)

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

    public static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority)public static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority)Public Static Function RunAsync(handler As WorkItemHandler, priority As WorkItemPriority) As IAsyncActionpublic static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority)

    Parameters

    Returns

  • RunAsync(WorkItemHandler, WorkItemPriority, WorkItemOptions)
    RunAsync(WorkItemHandler, WorkItemPriority, WorkItemOptions)
    RunAsync(WorkItemHandler, WorkItemPriority, WorkItemOptions)
    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.

    public static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options)public static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options)Public Static Function RunAsync(handler As WorkItemHandler, priority As WorkItemPriority, options As WorkItemOptions) As IAsyncActionpublic static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options)

    Parameters

    Returns

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.System.Threading.dll