On Tue, 28 Jul 2026 12:26:05 GMT, Per Minborg <[email protected]> wrote:

> This PR proposes to add comments in `LazyConstants.Mutexes` so that it 
> becomes more evident where we have `volatile` access.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

I don't think writing "volatile access" all over the place actually helps with 
understanding the code. If there are ordering issues then the algorithmic 
requirements for ordering should be documented and how that is achieved.

Aside: nulling out and re-creating the AtomicInteger `counter` seems somewhat 
pointless. Why not just reuse it?

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

PR Review: https://git.openjdk.org/jdk/pull/32069#pullrequestreview-4803918780

Reply via email to