WorkItemHandler WorkItemHandler WorkItemHandler WorkItemHandler Delegate
Represents a method that is called when a work item runs.
public : delegate void WorkItemHandler(IAsyncAction operation)
public delegate void WorkItemHandler(IAsyncAction operation)
Public Delegate WorkItemHandler(operation As IAsyncAction)
The work item to associate with the callback method.
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
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.