Skip to main content

Custom thread pool in parallel stream

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2010-11-23

Is it possible to specify a custom thread pool for Java 8 parallel stream? I can not find it anywhere. It would be useful for paralelizing tasks that are not CPU intensive. Imagine that you want to do network operations in the "map" phase so you want to use a separate pool with more threads. Maybe it's a misuse of the streams, but it's so obvious use-case that I will not be the only one trying to do it.