RFR: 8336707: Contention of ForkJoinPool grows when stealing works [v29]

Doug Lea dl at openjdk.org
Wed Nov 20 13:26:21 UTC 2024


On Wed, 20 Nov 2024 10:36:13 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> resetThreadLocals looks good although. A discussion point is whether reset should be done for all FJP instances, not just the common pool but not this PR.
>
> Thanks Alan. Yes, I think it should be considered to do it for all FJP instances.

Well, almost all. There is a protected FJWT constructor with explicit arg about preserving ThreadLocals,, in which case it should also not reset CCL. (Also, I just noticed that the Thread ctor with !inherit now also forces using System classLoader, so the FJWT ctor no longer needs to in this case.) Will do as part of SM-removal pr coming next.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21507#discussion_r1850310793


More information about the core-libs-dev mailing list