On Thu, 8 Jun 2023 03:36:52 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>>> A thread carrying a virtual thread can not be in native, blocked, parked, >>> sleeping or waiting on some object. >> >> A virtual thread can call native code, be blocked on an object monitor, or >> waiting on an object monitor. Only parking and sleeping are specialized for >> virtual threads in the list you gave. > >> > A thread carrying a virtual thread can not be in native, blocked, parked, >> > sleeping or waiting on some object. > >>A virtual thread can call native code, be blocked on an object monitor, or >>waiting on an object monitor. Only parking and sleeping are specialized for >>virtual threads in the list you gave. > > This statement was about a carrier thread (not a `JavaThread` and not a ` > java.lang.VirtualThread`) when there is a virtual thread executed at the top. > We are getting state bits with the > `java_lang_Thread::get_thread_status(thread_oop)` where the `thread_oop` > belongs to the carrier thread. But you are talking about a virtual thread > which, of course, can be in almost any state. Thanks for clarifying - it gets very confusing as to which "thread" is being talked about. But if a virtual thread is mounted on this JavaThread then I thought the carrier thread's thread-oop is supposed to be in a blocked state? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14366#discussion_r1222437953