RFR: 8315131: Clarify VarHandle set/get access on 32-bit platforms [v3]
Raffaello Giulietti
rgiulietti at openjdk.org
Fri Jul 18 20:52:42 UTC 2025
On Thu, 17 Jul 2025 23:15:44 GMT, John R Rose <jrose at openjdk.org> wrote:
>> Yep, to distinguish access and the encapsulated read-modify-write atomicity, I decided to avoid using "atomic"/"non-atomic" altogether - now it is just "make no atomicity guarantee"
>
> Not sure this is relevant, but isn't "opaque" access the way to request atomicity "by all means possible"? So a user who cares can use `VH::getOpaque` if the requirement is atomicity aligned to `CAS`.
>
> I still agree that it is good to specify the meaning of plain `VH::get` and `VH::set` as much as possible.
Opaque mode indeed ensures atomic access to primitive and reference variables.
In addition, it ensures coherence on that variable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26258#discussion_r2216902696
More information about the core-libs-dev
mailing list