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

Patricio Chilano Mateo pchilanomate at openjdk.org
Fri Oct 17 15:26:58 UTC 2025


On Fri, 17 Oct 2025 02:45:59 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   rename to was_notified
>
> src/hotspot/share/runtime/objectMonitor.cpp line 1925:
> 
>> 1923:     OrderAccess::loadload();
>> 1924:     if (has_successor(current)) clear_successor();
>> 1925:     WasNotified = node.TState == ObjectWaiter::TS_ENTER;
> 
> We don't really need the `WasNotified` local any more as it is only used once below (which saves me from asking you to rename it `was_notified`.)

We also use it at the end when checking to throw IE, and by then the state is always `TS_RUN`. But I renamed it to `was_notified`.

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

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


More information about the hotspot-runtime-dev mailing list