Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rules for AsParallel #212

Open
jass790909 opened this issue May 22, 2023 · 0 comments
Open

New Rules for AsParallel #212

jass790909 opened this issue May 22, 2023 · 0 comments

Comments

@jass790909
Copy link

Hi,
I would like to suggest a new rule for PLinq that AsParallel should pair up with WithDegreeOfParallelism.

SomeEnumerable
         .AsParallel()
         .WithDegreeOfParallelism(someNumber)
         ...

In our case, we are sending hundreds web requests parallelly, however, we don't want to create so many threads at the same time.
As discussion with Brian yesterday, sending request is an IO bound function and therefore we could have this new rule to our project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants