Compartilhar via


IBackgroundTaskQueue.QueueBackgroundWorkItem Method

Definition

Enqueue a work item to be processed on a background thread.

public void QueueBackgroundWorkItem(Func<System.Threading.CancellationToken,System.Threading.Tasks.Task> workItem);
abstract member QueueBackgroundWorkItem : Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> -> unit
Public Sub QueueBackgroundWorkItem (workItem As Func(Of CancellationToken, Task))

Parameters

workItem
Func<CancellationToken,Task>

The work item to be enqueued for execution. Is defined as a function taking a cancellation token.

Applies to