RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked [v3]
Alan Bateman
alanb at openjdk.org
Mon Sep 18 05:47:45 UTC 2023
On Mon, 18 Sep 2023 01:44:10 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Surely that is not a specified exported thread state though ?? Why would we care about PINNED (timed or otherwise) in the current context?
There are internal states and then mappings to the thread states defined by the APIs (Thread::getState, JVMTI GetThreadState). A virtual thread that parkNanos while pinned will park on its carrier, it doesn't unmount and release the carrier. If some other threads polls the virtual thread state then will see Thread.State.TIMED_WAITING (or state bits that include JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT in the case of JVMTI). So no change to the API, no suggestion whatsoever of exposing "PINNED" in the API.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14978#discussion_r1328266854
More information about the serviceability-dev
mailing list