RFR: JDK-8319662 ForkJoinPool trims worker threads too slowly

Viktor Klang vklang at openjdk.org
Mon Nov 20 11:29:30 UTC 2023


On Sun, 19 Nov 2023 17:36:01 GMT, Doug Lea <dl at openjdk.org> wrote:

> This update cascades timeouts to trim subsequent workers after the first  keepAlive inactive period.

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 680:

> 678:      * time out and terminate if the pool has remained quiescent for
> 679:      * period given by field keepAlive (default 60sec), which applies
> 680:      * to the first timeout of a fully populated pool. Subsequent (or

If I understand this correctly, it means that the entire pool needs to have no work (at all) before starting to decommission workers. Is that the case?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16725#discussion_r1399058194


More information about the core-libs-dev mailing list