On Fri, 20 Jun 2025 01:23:23 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:
>> src/java.desktop/share/classes/java/awt/GraphicsDevice.java line 306: >> >>> 304: } >>> 305: // Set the full screen window >>> 306: synchronized (fsAppContextLock) { >> >> A `synchronized` block has stronger memory consistency guarantees than a >> `volatile` modifier. >> >> Did you consider leaving the synchronized block but removing the usage of >> `AppContext`? > > What do you mean by stronger in this use case? 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25818#discussion_r2159523719