[concurrency-interest] ForkJoinPool not designed for nested Java 8 streams.parallel().forEach( ... )

Doug Lea dl at cs.oswego.edu
Fri May 9 09:25:22 EDT 2014

On 05/09/2014 09:05 AM, Christian Fries wrote:
> Wouldn’t flattening mean loss of abstraction (no abstraction between F and
> LM), spaghetti code, etc.

Somehow we seem to be talking past each other. Here's a restart:

1. j.u.Stream.parallel() automates many forms of parallelism.

2. It doesn't do a great job for your usage on your computer.

3. Because of side issues (like blocking Semaphores), it took
some effort to discover underlying problems.

4. But now we know why, and will try to improve. For reasons you
probably don't care about, it is hard to improve this usage while
not hurting others.

5. In the mean time, you could if desired manually arrange
parallelism rather than relying on j.u.streams.


More information about the Concurrency-interest mailing list