RFR: 8369944: Notification can be lost due to interrupt in Object.wait [v2]

David Holmes dholmes at openjdk.org
Mon Oct 20 08:03:34 UTC 2025


On Fri, 17 Oct 2025 15:24:26 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> I think it is the latter. We could read a stale TState value no matter what, as it may have only just been set before we read it. But not seeing TS_WAIT is just an optimisation to skip the park.
>
> Exactly. If the notifier already issued the unpark then the park permit (`PlatformEvent::_event`) will be set.

Doh! I was forgetting that park (unlike wait) has a permit. Thanks for clarifying.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27856#discussion_r2444084647


More information about the hotspot-runtime-dev mailing list