Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AsyncQueue<T>

Async queue.

param

The worker function to call for each task.

param

How many workers to run in parrallel. Must be greater than 0.

returns

The async queue object.

Type parameters

  • T

    Element type of the queue.

Hierarchy

  • AsyncQueue

Index

Constructors

constructor

Properties

concurrency

concurrency: number

onDrain

onDrain: Signal<OnDrainSignal> = new Signal<OnDrainSignal>()

onEmpty

onEmpty: Signal<OnEmptySignal> = new Signal<OnEmptySignal>()

onError

onError: Signal<OnErrorSignal<T>> = new Signal<OnErrorSignal<T>>()

onSaturated

onSaturated: Signal<OnSaturatedSignal> = new Signal<OnSaturatedSignal>()

onUnsaturated

onUnsaturated: Signal<OnUnsaturatedSignal> = new Signal<OnUnsaturatedSignal>()

worker

worker: IWorker<T>

Accessors

started

  • get started(): boolean

Methods

getTask

  • getTask(index: number): ITask<T>

idle

  • idle(): boolean

length

  • length(): number

pause

  • pause(): void

process

  • process(): void

push

reset

  • reset(): void

resume

  • resume(): void

running

  • running(): number

unshift

Generated using TypeDoc