UNPKG

@wfh/thread-promise-pool

Version:

2 Node.js utilities: a thread worker pool and a promise queue

5 lines (4 loc) 209 B
export declare function queueUp<T>(parallel: number, actions: Array<() => Promise<T>>): Promise<T[]>; export declare function queue(maxParallel: number): { add<T>(action: () => Promise<T>): Promise<T>; };