RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked [v3]

Alan Bateman alanb at openjdk.org
Thu Sep 14 13:32:42 UTC 2023


On Wed, 26 Jul 2023 12:18:02 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Yes but TIMED and SUSPENDED are not alike. I assume SUSPENDED is a stand-alone bit because you can be in various states and suspended at the same time. But TIMED isn't like that.

The SUSPENDED bit can only be set when the virtual thread is unmounted, so limited to the RUNNABLE and PARKED states at this time.

The intention with TIMED was that it could be OR'ed with PARKING, PARKED or PINNED to quality that they are timed rather than untimed. It wouldn't make sense in other states.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14978#discussion_r1325955801


More information about the core-libs-dev mailing list