Run async functions in sequence.

Hierarchy

  • AsyncSeq

Constructors

Accessors

Methods

Constructors

Accessors

  • get full(): boolean
  • Is sequence full.

    Returns boolean

  • get running(): boolean
  • Is sequence running.

    Returns boolean

  • get size(): number
  • Size of pending tasks in the sequence.

    Returns number

Methods

  • Add task executors to the sequence.

    Returns

    Promise that resolves when all tasks in the sequence are executed.

    Parameters

    • Rest ...fns: AsyncSeqFn[]

      Task executors. Optionally returns a disposer function that cleans up side effects.

    Returns Promise<void>

  • Dispose the sequence.

    Returns Promise<void>

  • Wait for the sequence to finish.

    Returns Promise<void>