RFR: 8359266: Delete the usage of AppContext in the GraphicsDevice

Alexey Ivanov aivanov at openjdk.org
Fri Jun 20 20:31:34 UTC 2025


On Fri, 20 Jun 2025 20:12:52 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> I mean that there's a _happens before_ relation each time the synchronized block is reach whereas with volatile, the _happens before_ relation is guaranteed only when the value of the variable changes.
>
>> I mean that there's a _happens before_ relation each time the synchronized block is reach whereas with volatile, the _happens before_ relation is guaranteed only when the value of the variable changes.
> 
> I do not think that this is true "guaranteed only when the value of the variable changes".
>>A write to a volatile field ([§8.3.1.4](https://docs.oracle.com/javase/specs/jls/se14/html/jls-8.html#jls-8.3.1.4)) happens-before every subsequent read of that field.

Exactly! A *write* to a volatile field.

Yet entering and leaving a synchronized block gives a happens-before relation *each time*.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25818#discussion_r2159624167


More information about the client-libs-dev mailing list