Closed gquittet closed 1 year ago
What's the difference between your implementation and this KISS implementation?
const allLimit = async (promises, { concurrency = 0 } = {}) => { if (concurrency < 1) { return (await Promise.all(promises.map((p) => p()))); } let result = []; for (const promisesChunk of chunk(promises, concurrency)) { const t = await Promise.all(promisesChunk.map((p) => p())); result = result.concat(t); } return result; };
Do we really need yocto-queue?
Yes: https://github.com/sindresorhus/p-limit/pull/46
Thank you I haven't found this merge request before.
It's pretty clear to me.
I close this issue.
What's the difference between your implementation and this KISS implementation?
Do we really need yocto-queue?