DkmWorkList Class

Definition

Collection of asynchronous work items which are processed together. Work items are appended by calling any of the asynchronous methods throughout this API. Work items may be appended freely until the work list begins execution. Once execution has begun, additional work may only be appended from the implementation of a work item processing interface, or from a completion routine.

public ref class DkmWorkList sealed : MarshalByRefObject
public sealed class DkmWorkList : MarshalByRefObject
type DkmWorkList = class
    inherit MarshalByRefObject
Public NotInheritable Class DkmWorkList
Inherits MarshalByRefObject
Inheritance
DkmWorkList

Properties

IsCanceled

This property allows a component processing a work item to determine if it is canceled, or for a completion routine to determine if the operation was canceled.

IsCurrentInstanceCanceled

This property allows a component to determine if the current operation should be canceled. This will return true when called from a thread which is currently processing a work list, and when this work list has been canceled.

This will throw if called from a completion routine or from a thread that is not currently processing an interface call.

Methods

BeginExecution()

Begin execution of the items in this work list. This API will return immediately and completion routines are fired to return results. Callbacks will fire as results complete (unordered).

This method may only be called by the component which created the object.

BeginExecution(DkmWorkListExecutionThread)

Begin execution of the items in this work list. This API will return immediately and completion routines are fired to return results. Callbacks will fire as results complete (unordered).

This method may only be called by the component which created the object.

This API was introduced in Visual Studio 15 Update 5 (DkmApiVersion.VS15Update5).

BeginExecution(DkmWorkListExecutionThread, DkmWorkListPriority)

Begin execution of the items in this work list. This API will return immediately and completion routines are fired to return results. Callbacks will fire as results complete (unordered).

This method may only be called by the component which created the object.

This API was introduced in Visual Studio 15 Update 8 (DkmApiVersion.VS15Update8).

Cancel()

Cancel execution of this work list. This API will return once all work on this work queue has stopped (worklist is canceled or completed). The request is ignored if the work list is already canceled. This method may only be called by the component which created the object.

Note for components declared as 'Synchronized' in the component configuration: calling this API may implicitly release and then reacquire the lock around your component. Be mindful of possible state changes.

Cancel(Boolean)

Cancel execution of this work list. The request is ignored if the work list is already canceled. This method may only be called by the component which created the object.

This API was added in Visual Studio 15 Update 7 (DkmApiVersion.VS15Update7)

Create(DkmWorkListCompletionRoutine)

Creates a new empty work list object. Callers should append operations to the work list and then start execution ('BeginExecution' or 'Execute').

Once created, a WorkList object will continue to exist until its execution is completed, or until the request is canceled. So callers should ensure that 'Cancel' is called in the case of failure.

Execute()

Synchronously execute all items in the work list and return when processing is complete or has been canceled, including firing all completion routines. Callbacks will fire as results are complete (unordered).

This method may only be called by the component which created the object. This method will throw if execution is already in progress.

SetDescription(String)

Sets a string that can be used to describe the operation(s) performed by the worklist. This can be displayed when execution of other operations are blocked by this worklist.

This API was introduced in Visual Studio 15 Update 7 (DkmApiVersion.VS15Update7).

Applies to