RFR: 8344773: SM cleanup in ForkJoinPool [v2]

Doug Lea dl at openjdk.org
Mon Nov 25 16:02:16 UTC 2024


On Mon, 25 Nov 2024 10:23:36 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Doug Lea has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>> 
>>  - Merge branch 'openjdk:master' into JDK-8344773
>>  - Remove redundant doc comment; clarify condinional
>>  - Merge branch 'openjdk:master' into JDK-8344773
>>  - Remove SecurityManager-related code; refactor resetThreadLocals
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinWorkerThread.java line 240:
> 
>> 238:      * Peforms any associated cleanup on resetThreadLocals
>> 239:      */
>> 240:     void onThreadLocalReset() {
> 
> @DougLea I'm wondering if it might be clearer if it was something like `afterThreadLocalReset` or `postThreadLocalReset` or something indicating that TLs have already expired by the point this is invoked.

How about just being clearer about this in javadoc: Changed to:
    /**
     * Performs any further cleanup after ThreadLocals are cleared in
     * method resetThreadLocals
     */

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22324#discussion_r1856869429


More information about the core-libs-dev mailing list