[External] : Re: Years later, finally integrating ClassValue... but...

Chen Liang chen.l.liang at oracle.com
Wed May 21 20:55:44 UTC 2025


Yes. You are correct.

________________________________
From: Charles Oliver Nutter <headius at headius.com>
Sent: Wednesday, May 21, 2025 3:53 PM
To: Remi Forax <forax at univ-mlv.fr>
Cc: Da Vinci Machine Project <mlvm-dev at openjdk.org>; Chen Liang <chen.l.liang at oracle.com>
Subject: [External] : Re: Years later, finally integrating ClassValue... but...

Ok thanks for the confirmations!

If I'm understanding correctly, in the future the way to guarantee once-only initialization of a ClassValue would be to have it produce a StableValue, of which only one will be installed, and which will then be guaranteed by the JVM to have once-only initialization and a foldable, stable result. Until that is generally available, I should use a factory object with double-checked locking to ensure once-only initialization (which is essentially what my own ClassValue did, but built as a wrapper around java.lang.ClassValue).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/mlvm-dev/attachments/20250521/45ba8771/attachment-0001.htm>


More information about the mlvm-dev mailing list