FJP::setParallelism update

Dan Heidinga heidinga at redhat.com
Thu May 26 14:25:55 UTC 2022


How often should we plan to update the crac branch from the mainline?

With the recent merge of Loom, j.u.c.ForkJoinPool gained a new
capability that allows users to resize the existing FJPs.  This was
added by Doug Lea (big thanks!) to support Loom's use cases and to
also to help us adapt to changes in the number of threads between
checkpoint & restore.

The new method is ::setParallelism(int) [0].  Once the crac branch
consumes the latest jdk stream, I'll update FJP to implement Resource
and we can update the parallelism so pools, in particular the common
pool, work better when the available # of threads changes.

--Dan

[0] https://github.com/openjdk/crac/blob/f235955eefb1141a2e72116dfcf345e40416f059/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java#L2938



More information about the crac-dev mailing list