RFR: 8346120: VirtualThreadPinned event recorded for Object.wait may have wrong duration or may record second event [v2]
Alan Bateman
alanb at openjdk.org
Fri Dec 13 17:39:56 UTC 2024
On Fri, 13 Dec 2024 16:26:00 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
>> Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
>>
>> testObjectWait2 test already owns lock
>
> test/jdk/java/lang/Thread/virtual/MonitorPinnedEvents.java line 345:
>
>> 343: vthread.interrupt();
>> 344: } else {
>> 345: synchronized (lock) {
>
> Not sure if this was intentional but we already own the monitor.
Well spotted, it was copied down from the other test other test that can also interrupt or notify, this main thread in this case already owns the monitor so no need to enter again. Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22718#discussion_r1884271603
More information about the core-libs-dev
mailing list