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

Discourage submitting tasks to ForkJoinPool.commonPool #335

Open
mattnelson opened this issue Feb 14, 2019 · 1 comment
Open

Discourage submitting tasks to ForkJoinPool.commonPool #335

mattnelson opened this issue Feb 14, 2019 · 1 comment
Labels

Comments

@mattnelson
Copy link

When performing concurrent processing outside of a parallel stream, I have lazily used the common fork join pool to avoid creating my own executor service. Many times I have used it for blocking I/O operations which then have the ability to saturate the pool and therefore block all other attempts for other threads to use parallel streams as they were designed.

What do you think about adding a rule to warn when calling execute/submit/invoke*/newTaskFor/etc... directly on the common pool?

https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ForkJoinPool.html#commonPool--

@mebigfatguy
Copy link
Owner

I'll have to do some reading... pretty esoteric i'm thinking... Not that you are wrong, just i am ignorant here.

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

No branches or pull requests

2 participants