RFR: 8257831: Suspend with handshakes [v10]
Robbin Ehn
rehn at openjdk.java.net
Wed Apr 21 07:32:28 UTC 2021
On Wed, 21 Apr 2021 04:39:35 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Borrowing the HandshakeState lock does create an artificial coupling here. I'd prefer to see this API in a more natural place with friendship used to access the mechanism as needed. Future cleanup though.
>
> Also I think you'd have a lost-wakeup problem if two locks were involved.
You are correct, above those not work as is. We would need to protect the suspend flag with SomeOtherLock, thus also needing to lock SomeOtherLock when suspending.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3191
More information about the hotspot-runtime-dev
mailing list