NewDash

    Variable concurrencyConst

    concurrency: {
        any: <T>(iterable: Iterable<Promise<T>>) => Promise<T>;
        debounce: <T extends AsyncFunction>(runner: T, wait: number) => T;
        limit: <T extends AsyncFunction>(runner: T, concurrencyNumber: number) => T;
        reuse: <T extends AsyncFunction>(
            runner: T,
            duration?: number,
            maxHandles?: number,
        ) => T & {
            __wrap_global__: {
                duration: number;
                handles: LRUMap<string, { timeout: number; value: any }>;
            };
        };
        series: <T extends AsyncFunction[]>(
            ...asyncOperations: T,
        ) => Promise<SeriesResult<T>>;
        synchronized: <T extends AsyncFunction>(func: T) => T;
        timeout: <T extends AsyncFunction>(runner: T, timeout?: number) => T;
    } = ...

    concurrency functions

    Type declaration

    • any: <T>(iterable: Iterable<Promise<T>>) => Promise<T>
    • debounce: <T extends AsyncFunction>(runner: T, wait: number) => T
    • limit: <T extends AsyncFunction>(runner: T, concurrencyNumber: number) => T
    • reuse: <T extends AsyncFunction>(
          runner: T,
          duration?: number,
          maxHandles?: number,
      ) => T & {
          __wrap_global__: {
              duration: number;
              handles: LRUMap<string, { timeout: number; value: any }>;
          };
      }
    • series: <T extends AsyncFunction[]>(...asyncOperations: T) => Promise<SeriesResult<T>>
    • synchronized: <T extends AsyncFunction>(func: T) => T
    • timeout: <T extends AsyncFunction>(runner: T, timeout?: number) => T
    MMNEPVFCICPMFPCPTTAAATR