RFR: 8364819: Post-integration cleanups for JDK-8359820 [v5]
Albert Mingkun Yang
ayang at openjdk.org
Thu Aug 14 08:30:12 UTC 2025
On Tue, 12 Aug 2025 12:21:53 GMT, Anton Artemov <duke at openjdk.org> wrote:
> I do not think so, getters return a copy of the thread's address.
My previous msg was probably unclear -- I meant to use `Atomic::load` in the getter, which is exactly what is in the latest revision.
> ... as we never will have update of the value happening concurrently with the read, as there is an expensive operation between the two
I think it's fragile to rely on surrounding code to maintain the desired memory ordering. An `acquire` fence on the reader side makes it more explicit and convey the intention clearly. Maybe this is subjective, up to you and other reviewers to decide.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26656#issuecomment-3187466382
More information about the hotspot-dev
mailing list