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

Should StreamEx#parallel accept ExecutorService instead of ForkJoinPool? #181

Closed
JeanFrancoisSavard opened this issue May 24, 2018 · 1 comment

Comments

@JeanFrancoisSavard
Copy link

I understand that the default implementation of Stream's use a ForkJoinPool, which I believe is the reason why StreamEx enforce this type.

Am I correct? Else, could the parallel accept a ExecutorService?

@amaembo
Copy link
Owner

amaembo commented May 25, 2018

This would not work. Internally parallel stream executes task in current FJP if any or in common pool. It cannot execute in custom ExecutorService, so adding this feature would mean complete reimplementation of stream parallelization which is out of scope of StreamEx.

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

No branches or pull requests

2 participants