PreallocatedWorkItem.PreallocatedWorkItem(WorkItemHandler) constructor

Applies to Windows and Windows Phone

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

Syntax


Public Sub New (
  handler As WorkItemHandler 
)

Parameters

handler

Type: 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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

See also

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

 

 

Show:
© 2014 Microsoft