mirror of
https://github.com/rxaviers/async-pool.git
synced 2026-01-25 16:07:54 +00:00
Remove unused variables
This commit is contained in:
parent
47dee89692
commit
29c1920de6
@ -1,10 +1,7 @@
|
||||
async function* asyncPool(concurrency, iterable, iteratorFn) {
|
||||
let done;
|
||||
const ret = [];
|
||||
const executing = new Set();
|
||||
for (const item of iterable) {
|
||||
const promise = Promise.resolve().then(() => iteratorFn(item, iterable));
|
||||
ret.push(promise);
|
||||
executing.add(promise);
|
||||
const clean = () => executing.delete(promise);
|
||||
promise.then(clean).catch(clean);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user