RFR: JDK-8310584: GetThreadState reports blocked and runnable for pinned suspended virtual threads

Alan Bateman alanb at openjdk.org
Mon Jul 17 09:47:14 UTC 2023


On Mon, 17 Jul 2023 04:37:08 GMT, David Holmes <dholmes at openjdk.org> wrote:

> Sorry I don't follow. I don't see anything that prevents the target from terminating after you have read the interrupt bit from the thread object, but before you read the actual state.

The virtual thread state and the interrupt status are separate. That's okay for the suspended case, assuming not resumed while JVMTI GetThreadState executes. If not suspended then it looks like it could give an inconsistent view of the state. I don't know why GetThreadState defined a state flag for interrupted.

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

PR Comment: https://git.openjdk.org/jdk/pull/14878#issuecomment-1637714962


More information about the serviceability-dev mailing list