-
Bug
-
Resolution: Unresolved
-
P4
-
19
-
None
With the ForkJoin updates for Java 19, the common pool stopped clearing thread locals.
If someone relies on this behavior, then it is a semantic change as code which does not manage their TLs properly will be able to observe unexpected values, and values will be retained for longer than expected.
Java 18: https://github.com/openjdk/jdk/blob/jdk-18%2B37/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java#L841
Java 19: https://github.com/openjdk/jdk/blob/jdk-19%2B36/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java#L984
If someone relies on this behavior, then it is a semantic change as code which does not manage their TLs properly will be able to observe unexpected values, and values will be retained for longer than expected.
Java 18: https://github.com/openjdk/jdk/blob/jdk-18%2B37/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java#L841
Java 19: https://github.com/openjdk/jdk/blob/jdk-19%2B36/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java#L984