4 ms·
Reading the JEP, isn’t StableValue about JIT constants? In .NET it’s just 'static readonly'.
by neonsunset 2y ago
Reading the JEP, isn’t StableValue about JIT constants?
In .NET it’s just 'static readonly'.
- cempaka 2y agoThe basic feature set is at-most-once thread-safe initialization of values, which can then enjoy the same constant folding and other JIT optimizations one would get from `static final`, but can be initialized at any point during the program's run.