vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Function chunkAsyncParallel

    • Executed the callback function on each chunk in the array limiting the number of parallel executions up to the parallelism number passed.

      Type Parameters

      • T
      • K

      Parameters

      • array: T[]

        Array with work items

      • fn: (chunk: T[], index: number, array: T[]) => K[] | Promise<K[]>

        Callback functions executed for each chunk

      • chunkSize: number

        Size of each chunk

      • parallelism: number = 2

        Max number of parallel worker callbacks active

      Returns Promise<K[]>

      Array of results