RFR: 8366121: Hotspot Style Guide should document conventions for lock-free code

David Holmes dholmes at openjdk.org
Thu Aug 28 06:30:44 UTC 2025


On Tue, 26 Aug 2025 00:26:59 GMT, David Holmes <dholmes at openjdk.org> wrote:

> This is a topic that we, at Oracle, have discussed numerous times over the years and we have some simple guidelines that never get written down properly and which we/I tend to forget and then can't locate. To remedy that I would like to capture a few very simple style rules that exist for documentation purposes not necessarily correctness.
> 
> Thanks

Thanks for all the reviews.

I was contemplating withdrawing this as it has inspired Kim Barrett to work on an `AtomicValue` API (name may change) which makes this precise guidance moot most of the time. However, this added section can be used to document the need to use `AtomicValue` and there may be times use of `AtomicValue` is not applicable/appropriate.

@kvn could you please approve if you believe sufficient consensus exists for this. Thank you.

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

PR Comment: https://git.openjdk.org/jdk/pull/26934#issuecomment-3232097042


More information about the hotspot-dev mailing list