On Fri, 18 Apr 2025 12:47:37 GMT, Jorn Vernee <[email protected]> wrote:
>> Per Minborg has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Address comments on original vs underlying
>
> src/java.base/share/classes/java/lang/StableValue.java line 389:
>
>> 387: * successful invocation. Since stable functions and stable collections
>> are built on top
>> 388: * of {@linkplain StableValue#orElseSet(Supplier) orElseSet()} they too
>> are
>> 389: * thread safe and guarantee at-most-once-per-input invocation.
>
> I think you should drop the note here about stable collections being built on
> top of `orElseSet`. This is an interesting implementation detail, but not
> directly relevant for the specification, and some that we might want to
> change in the future.
>
> I suggest just specifying the behavior of stable collections directly,
> without mentioning how they are implemented.
Good catch. I now say "Since stable functions and stable collections are built
on top
of the same principles as {@linkplain StableValue#orElseSet(Supplier)
orElseSet()} they
too are thread safe and guarantee at-most-once-per-input invocation."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2053853385