On Thu, 25 Jun 2026 11:34:28 GMT, Johan Sjölen <[email protected]> wrote:

>> src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java 
>> line 392:
>> 
>>> 390: 
>>> 391:         final Thread getAcqWaiter() {
>>> 392:             return (Thread)WAITER.getAcquire(this);
>> 
>> @DougLea Are you OK with this change, or should we make the access even 
>> stronger?
>
> This isn't sufficient, it needs a Java volatile load as it needs to be 
> ordered with a different variable. This just happens to work with our current 
> choice of loadAcquire instruction on ARM64 (as @merykitty has pointed out).

Maybe a full fence is the cleaner expression here? It directly says that 
everything before the fence, including the successful exchange, stays before 
everything after it, including ordinary loads.

@DougLea is the expert, though :P

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31465#discussion_r3474253040

Reply via email to