0 out of 12 rated this helpful - Rate this topic

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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.