RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Nov 6 17:40:10 UTC 2024
On Wed, 6 Nov 2024 09:24:03 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> So at some point I think we need to figure out how to make them go away ...
Yes, the 2 extension events (`VirtualThreadMount` and `VirtualThreadUnmount`) were added for testing purposes. We wanted to get rid of them at some point but the Graal team was using them for some purposes.
> It's posted before. We post the mount event at the end of thaw only if we are able to acquire the monitor...
The two extension events were designed to be posted when the current thread identity is virtual, so this behavior needs to be considered as a bug. My understanding is that it is not easy to fix. We most likely, we have no tests to fail because of this though.
> That's the path a virtual thread will take if pinned.
Got it, thanks. I realize it is because we do not thaw and freeze the VM frames. It is not easy to comprehend.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1831293112
More information about the core-libs-dev
mailing list