RFR: 8359119: Change Charset to use StableValue [v2]
Per Minborg
pminborg at openjdk.org
Tue Jun 10 15:19:29 UTC 2025
On Tue, 10 Jun 2025 15:04:44 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Revert for loop
>> - Revert more
>> - Revert changes
>
> src/java.base/share/classes/java/nio/charset/Charset.java line 384:
>
>> 382:
>> 383: private static final Supplier<ThreadTracker> TRACKER = StableValue.supplier(
>> 384: new Supplier<>() { public ThreadTracker get() { return new ThreadTracker(); }});
>
> ThreadTracker pre-dates ScopedValue. We could potentially use a ScopedValue<Boolean> IN_USE here, or StableValue<ScopedValue<Boolean>> if there are issues running the class initializer in early VM startup. Separate discussion but we don't need ThreadTracker now.
So, revert the changes here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25727#discussion_r2138177730
More information about the nio-dev
mailing list