RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v33]

Per Minborg pminborg at openjdk.org
Thu Apr 3 08:46:13 UTC 2025


On Wed, 2 Apr 2025 14:25:45 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add info that Map#values and Map#entrySet are stable
>
> src/java.base/share/classes/java/lang/StableValue.java line 384:
> 
>> 382:  * (e.g. {@linkplain #trySet(Object) trySet()})
>> 383:  * {@linkplain java.util.concurrent##MemoryVisibility <em>happens-before</em>}
>> 384:  * any subsequent read operation (e.g. {@linkplain #orElseThrow()}) that is successful.
> 
> Suggestion:
> 
>  * any successful read operation (e.g. {@linkplain #orElseThrow()}).

A read operation that is made well before a write operation does mean the write operation happens before the read operation so I wanted to capture that using the work "subsequent". Did I miss something here?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2026500380


More information about the core-libs-dev mailing list