On Thu, 24 Oct 2024 05:54:11 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Fix comment in objectMonitor.hpp and javaThread.hpp >> - Skip printing tid when not available > > src/hotspot/share/prims/jvm.cpp line 4012: > >> 4010: } >> 4011: ThreadBlockInVM tbivm(THREAD); >> 4012: parkEvent->park(); > > What code does the unpark to wake this thread up? I can't quite see how this > unparker thread operates as its logic seems dispersed. It's very similar to the "Reference Handler" thread. That thread calls into the VM to get the pending-Reference list. Now we have "VirtualThread-unblocker" calling into the VM to get the list of virtual threads to unblock. ObjectMonitor::ExitEpilog will the unpark this thread when the virtual thread successor is on the list to unblock. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1814450822