You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to limit the max concurrency. This likely needs to be built into the ParallelStream trait itself, with each impl being responsible for carrying it.
The default limit should be unlimited, with the executor and runtime scheduling resources.
// Set max limit to 5let out:Vec<usize> = parallel_stream::repeat(5).take(100).limit(5)// <-- set max concurrency.map(async |n| n * n).collect().await;// Remove max limitlet out:Vec<usize> = parallel_stream::repeat(5).take(100).limit(None)// <-- set max concurrency.map(async |n| n * n).collect().await;
Naming
The name limit is inspired by the parameter name of for_each_concurrent. It seems small and to the point, though not particularly attached if there's something different that's concise yet to the point.
The text was updated successfully, but these errors were encountered:
It should be possible to limit the max concurrency. This likely needs to be built into the
ParallelStream
trait itself, with each impl being responsible for carrying it.The default limit should be unlimited, with the executor and runtime scheduling resources.
API Outline
Usage
Naming
The name
limit
is inspired by the parameter name offor_each_concurrent
. It seems small and to the point, though not particularly attached if there's something different that's concise yet to the point.The text was updated successfully, but these errors were encountered: