On Tue, 12 Aug 2025 13:23:32 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

>> The underlying function will be retained until all values are computed (non 
>> exceptionally). It is as simple as that.
>> 
>> I was not able to come up with something better than that, but I am open to 
>> other suggestions.
>
> Would it make sense to record that it failed to initialize and then count 
> down the holder, and then throw ExceptionInInitializerError (or something 
> else?) upon subsequent access? 🤔

We thought about that in the past. There were several prototypes with a similar 
behavior. It is not an unreasonable alternative.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25878#discussion_r2272585714

Reply via email to