UNPKG

@altano/tiny-async-pool

Version:

Run multiple promise-returning & async functions with limited concurrency using native ES9

13 lines (12 loc) 247 B
import { doWorkAndYield } from "./doWorkAndYield.js"; async function doWork(concurrentCount, iterable, iteratorFn) { for await (const _result of doWorkAndYield( concurrentCount, iterable, iteratorFn )) { } } export { doWork };