p-iteration icon indicating copy to clipboard operation
p-iteration copied to clipboard

Possible to limit the number of concurrent iterations?

Open QAnders opened this issue 2 years ago • 1 comments

Thanks for the package! I love the simplicity of the useage!

We've been using p-map as well in some projects but due to the "structure" of it it is sometimes much easier to use your module but in p-map there is a parameter to limit the number of concurrent "threads", {concurrency: 2}

Is the same possible using your module?

QAnders avatar Nov 12 '21 13:11 QAnders

Hello!

It's not possible right now, I created this module so the methods have the same functionality as the vanilla Javascript Array iteration methods. So you are not going to find any extra option like {concurrency: 2}.

But I think that it could be a good addition for a v2 of this module, will take it into account for future releases.

toniov avatar Jan 20 '22 07:01 toniov