PreallocatedWorkItem PreallocatedWorkItem PreallocatedWorkItem PreallocatedWorkItem Constructors

Definition

Overloads

PreallocatedWorkItem(WorkItemHandler) PreallocatedWorkItem(WorkItemHandler) PreallocatedWorkItem(WorkItemHandler) PreallocatedWorkItem(WorkItemHandler)

Initializes a new work item with a WorkItemHandler delegate, allocating resources for the work item in advance.

PreallocatedWorkItem(WorkItemHandler, WorkItemPriority) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority)

Initializes a new work item with a WorkItemHandler delegate, allocating resources for the work item in advance, and specifies the priority of the work item relative to other work items in the thread pool.

PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions)

Initializes a new work item with a WorkItemHandler delegate, allocating resources for the work item in advance, and specifies the priority of the work item relative to other work items in the thread pool. Also specifies how the thread pool will allocate processor time for the work item.

PreallocatedWorkItem(WorkItemHandler) PreallocatedWorkItem(WorkItemHandler) PreallocatedWorkItem(WorkItemHandler) PreallocatedWorkItem(WorkItemHandler)

Initializes a new work item with a WorkItemHandler delegate, allocating resources for the work item in advance.

public : PreallocatedWorkItem(WorkItemHandler handler)
PreallocatedWorkItem(WorkItemHandler handler) const;
public PreallocatedWorkItem(WorkItemHandler handler)
Public Sub New(handler As WorkItemHandler)

Parameters

handler
WorkItemHandler WorkItemHandler

Indicates the method that the preallocated work item will run.

Remarks

In C++, make sure that methods used as WorkItemHandler delegates exhibit agile threading model behavior. Calling a non-agile method from a work item will cause a deadlock to occur.

See also

PreallocatedWorkItem(WorkItemHandler, WorkItemPriority) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority)

Initializes a new work item with a WorkItemHandler delegate, allocating resources for the work item in advance, and specifies the priority of the work item relative to other work items in the thread pool.

public : PreallocatedWorkItem(WorkItemHandler handler, WorkItemPriority priority)
PreallocatedWorkItem(WorkItemHandler handler, WorkItemPriority priority) const;
public PreallocatedWorkItem(WorkItemHandler handler, WorkItemPriority priority)
Public Sub New(handler As WorkItemHandler, priority As WorkItemPriority)

Parameters

handler
WorkItemHandler WorkItemHandler

Indicates the method that the preallocated work item will run.

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.

Remarks

See the remarks section of the PreallocatedWorkItem(WorkItemHandler) overload.

See also

PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions) PreallocatedWorkItem(WorkItemHandler, WorkItemPriority, WorkItemOptions)

Initializes a new work item with a WorkItemHandler delegate, allocating resources for the work item in advance, and specifies the priority of the work item relative to other work items in the thread pool. Also specifies how the thread pool will allocate processor time for the work item.

public : PreallocatedWorkItem(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options)
PreallocatedWorkItem(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options) const;
public PreallocatedWorkItem(WorkItemHandler handler, WorkItemPriority priority, WorkItemOptions options)
Public Sub New(handler As WorkItemHandler, priority As WorkItemPriority, options As WorkItemOptions)

Parameters

handler
WorkItemHandler WorkItemHandler

Indicates the method that the preallocated work item will run.

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.

options
WorkItemOptions WorkItemOptions

If this parameter is set to 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 set to None, the work item runs when a worker thread becomes available.

Remarks

See the remarks section of the PreallocatedWorkItem(WorkItemHandler) overload.

See also