[concurrency-interest] ForkJoinPool creating thousands of threads

Doug Lea dl at cs.oswego.edu
Tue Feb 22 19:32:38 EST 2011

On 02/22/11 17:21, Christopher Berner wrote:
> The results I'm seeing are very confusing, however. It appears that the threads
> are blocking on join, instead of stealing more work.

Joining threads will eventually give up looking for stealable work
and instead block after arranging a replacement. Among the reasons
they can give up is that code to split subtasks is very slow,
or most likely, it blocks on some lock common to all subtasks,
so splits become sequential, leading to an expensive emulation
of a sequential program.

If neither of these apply, feel free to send code off-list
and I'll try to diagnose.


More information about the Concurrency-interest mailing list