Table of Contents

Class JobQueue

Namespace
NanoByte.Common.Threading
Assembly
NanoByte.Common.dll

Runs jobs on a single background thread that is started and stopped on demand.

public class JobQueue
Inheritance
object
JobQueue
Extension Methods

Constructors

JobQueue(CancellationToken)

Runs jobs on a single background thread that is started and stopped on demand.

public JobQueue(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Used to stop processing jobs.

Methods

Enqueue(Action)

Adds a job to the work queue.

public void Enqueue(Action job)

Parameters

job Action