On Thu, 3 Apr 2025 14:26:15 GMT, Quan Anh Mai <qa...@openjdk.org> wrote:
>> I don't think we should promise this even though it might be the case. > > What is the benefit of not promising it? Promising helps the supplier to have > a well-defined order of execution. Furthermore, even if you do not promise > it, it is the only possible implementation now and people will depend on it > regardless. I tend to agree with @merykitty - what that guarantee says is that - e.g. you can't have an exceptional call to the supplier (but this holds also for `orElseSet`) _after_ the stable value has been set. I think we already guarantee this implicitly, because we say that the action in `orElseSet` is never executed if the stable value has been set -- which implies that at least a supplier terminated normally (and that must be the last one -- otherwise it would not have executed at all...) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r2030878861