Search Results for

    Show / Hide Table of Contents
    View Source

    Class BackgroundTaskQueue

    A Background Task Queue, to enqueue tasks for executing in the background.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Infrastructure.HostedServices
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class BackgroundTaskQueue : IBackgroundTaskQueue
    Remarks

    Borrowed from https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-5.0

    Methods

    View Source

    DequeueAsync(CancellationToken)

    Dequeue the first item on the queue.

    Declaration
    public async Task<Func<CancellationToken, Task>?> DequeueAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<System.Nullable<Func<CancellationToken, Task>>>
    View Source

    QueueBackgroundWorkItem(Func<CancellationToken, Task>)

    Enqueue a work item to be executed on in the background.

    Declaration
    public void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem)
    Parameters
    Type Name Description
    Func<CancellationToken, Task> workItem
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • DequeueAsync(CancellationToken)
      • QueueBackgroundWorkItem(Func<CancellationToken, Task>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX