Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "util/pool"

Index

Functions

concurrentDefault

  • concurrentDefault(): number

executeAll

  • executeAll<T>(promises: Array<() => Promise<T>>, concurrent?: number): Promise<T[]>
  • Execute all provided promises with a max concurrency Results will be in the same order as the provided promises; if one promise rejects, execution is stopped and the returned promise is rejected as well.

    Type parameters

    • T

    Parameters

    • promises: Array<() => Promise<T>>

      all promises to execute

    • Default value concurrent: number = concurrentDefault()

      the max number of concurrent promise executions

    Returns Promise<T[]>

Generated using TypeDoc