Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WorkItemHandler delegate

Applies to Windows and Windows Phone

Represents a method that is called when a work item runs.

Syntax


public delegate void WorkItemHandler(
  IAsyncAction operation
)

Attributes

[Version(0x06020000)]
[WebHostHidden()]

Parameters

operation

Type: IAsyncAction

The work item to associate with the callback method.

Remarks

The thread pool calls a work item's WorkItemHandler delegate when a thread becomes available to run the work item. If a work item is canceled, WorkItemHandler delegates that have not yet started running are not called. WorkItemHandler delegates that are already running are allowed to finish unless the application stops them. If a work item might run for a relatively long time, the application should check if cancellation has been requested and stop the handler in an orderly way.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

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

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft