RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v40]
Per Minborg
pminborg at openjdk.org
Fri Apr 4 08:54:09 UTC 2025
On Thu, 3 Apr 2025 14:20:42 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Make the sqrt example different
>
> src/java.base/share/classes/java/lang/StableValue.java line 383:
>
>> 381: * (e.g. {@linkplain #trySet(Object) trySet()})
>> 382: * {@linkplain java.util.concurrent##MemoryVisibility <em>happens-before</em>}
>> 383: * any subsequent read operation (e.g. {@linkplain #orElseThrow()}) that is successful.
>
> Is `isSet()` also considered to be a "read operation"? I would assume so, but that requires a bit of reading between the lines. Maybe `isSet()` could be added as another parenthetical example after `orElseThrow()` here to squash that particular ambiguity.
Very good observation. I will clarify this. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2028387857
More information about the core-libs-dev
mailing list