Function concurrencyDecorator

  • A class method decorator that limits the concurrency of the method to the given number of parallel executions. All invocations are queued and executed in the order they were called.

    Type Parameters

    • This
    • Args extends any[]
    • Return

    Parameters

    • limit: number

    Returns ((fn, context?) => ((this, ...args) => Promise<Return>))

      • (fn, context?): ((this, ...args) => Promise<Return>)
      • Parameters

        • fn: ((this, ...args) => Promise<Return>)
        • Optional context: ClassMethodDecoratorContext<This, ((this, ...args) => Promise<Return>)>

        Returns ((this, ...args) => Promise<Return>)