IBackgroundTaskQueue.QueueBackgroundWorkItem Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.