On Fri, 20 Jun 2025 20:35:52 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>What I mean is two threads that called GraphicsDevice.getFullScreenWindow >still established a happens-before relation for each call, which will be gone >with the volatile modifier. >It may be fine… or may be not… this is why I'm asking. That only affects the case where the second thread tries to read shared data (unrelated to GraphicsDevice) without synchronization, which was written before the first thread called getFullScreenWindow(). If visibility is required, it should be ensured by the caller. Depending on some internal and undocumented lock for that is not a good thing. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25818#discussion_r2159783549