Options
All
  • Public
  • Public/Protected
  • All
Menu

An abstract class for a worker queue data structure

Type parameters

  • T

    the task element

  • V = unknown

    the worker value

Hierarchy

Index

Constructors

Properties

Tasks: Tasks<unknown>

Type: a queue of tasks

activeWorkers: number = 0

Number of active workers

concurrency: number

The maximum number of concurrent workers

createTasks: CreateInnerQueue<Tasks<unknown>> = ...

Returns a new blank internal queue of tasks

head: CanUndef<T>

The first element in the queue

refreshInterval: number

How often to update task statuses (in milliseconds)

tasks: Tasks<unknown>

A queue of tasks

worker: QueueWorker<T, V>

The worker constructor

Accessors

  • get length(): number

Methods

  • [asyncIterator](): AsyncIterableIterator<T>
  • [iterator](): IterableIterator<T>
  • clear(): void
  • deferPerform(): Promise<unknown>
  • perform(): unknown
  • push(task: T): unknown
  • resolveTask(task: T, resolve: Function): void
  • start(): void
  • unshift(el: T): unknown
  • values(): IterableIterator<T>