Improve parallelism
Closed this issue · 1 comments
NfNitLoop commented
For mapParUnordered
, I yield
all settled Promises before returning to filling the work queue. This means that, depending on where iteration pauses, there could be chunks of time where there are work slots available, but not running any tasks.
Should update that for better parallelism. Only yield one settled Promise at a time, then start refilling the pipeline. Could probably use partition to help simplify here. :)