Options
All
  • Public
  • Public/Protected
  • All
Menu

Implementation of a worker queue data structure with support of task merging by a specified hash function

Type parameters

  • T

    the task element

  • V = unknown

    the worker value

Hierarchy

Index

Constructors

Properties

Tasks: Tasks<string>

Type: a queue of tasks

activeWorkers: number = 0

Number of active workers

concurrency: number

The maximum number of concurrent workers

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

Returns a new blank internal queue of tasks

hashFn: HashFn<T>

A function to calculate task hashes

refreshInterval: number

How often to update task statuses (in milliseconds)

tasks: Tasks<string>

A queue of tasks

tasksMap: Map<string, Task<T, V>> = ...

A map of registered 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(): void
  • push(task: T): Promise<V>
  • resolveTask(task: T, resolve: Function): void
  • start(): void
  • unshift(el: T): Promise<V>
  • values(): IterableIterator<T>