On Thu, 24 Apr 2025 10:37:59 GMT, Per Minborg <[email protected]> wrote:
>> Implement JEP 502.
>>
>> The PR passes tier1-tier3 tests.
>
> Per Minborg has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Make public constuctor private
src/java.base/share/classes/jdk/internal/lang/stable/StableValueImpl.java line
175:
> 173: private void preventReentry() {
> 174: if (Thread.holdsLock(this)) {
> 175: throw new IllegalStateException("Recursive initialization of
> a stable value is illegal");
I don't know how common it is to use holdsLocks for control flow but just to
say that there are several places in the JDK that have to detect reentrancy and
some of these are good candidates to use ScopedValues.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2059996394