ThreadPool.RunAsync ThreadPool.RunAsync ThreadPool.RunAsync ThreadPool.RunAsync Method

Definition

Overloads

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

Creates a work item.

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.

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.

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

Creates a work item.

public : static IAsyncAction RunAsync(WorkItemHandler handler)
static IAsyncAction RunAsync(WorkItemHandler handler) const;
public static IAsyncAction RunAsync(WorkItemHandler handler)
Public Shared Function RunAsync(handler As WorkItemHandler) As IAsyncAction

Parameters

handler
WorkItemHandler WorkItemHandler

The method to call when a thread becomes available to run the work item.

Returns

An IAsyncAction interface that provides access to the work item.

See also

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)
static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority) const;
public static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority)
Public Shared Function RunAsync(handler As WorkItemHandler, priority As WorkItemPriority) As IAsyncAction

Parameters

handler
WorkItemHandler WorkItemHandler

The method to call when a thread becomes available to run the work item.

priority
WorkItemPriority WorkItemPriority

The priority of the work item relative to other work items in the thread pool. The value of this parameter can be Low, Normal, or High.

Returns

An IAsyncAction interface that provides access to the work item.

See also

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)
static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options) const;
public static IAsyncAction RunAsync(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options)
Public Shared Function RunAsync(handler As WorkItemHandler, priority As WorkItemPriority, options As WorkItemOptions) As IAsyncAction

Parameters

handler
WorkItemHandler WorkItemHandler

The method to call when a thread becomes available to run the work item.

priority
WorkItemPriority WorkItemPriority

The priority of the work item relative to other work items in the thread pool.

options
WorkItemOptions WorkItemOptions

If this parameter is TimeSliced, the work item runs simultaneously with other time-sliced work items with each work item receiving a share of processor time. If this parameter is None, the work item runs when a worker thread becomes available.

Returns

An IAsyncAction interface that provides access to the work item.

See also