| JDK 21 | JDK 22 |
|---|---|
| 21.0.4-oracleFixed | 22 b16Fixed |
|
Relates :
|
If a virtual thread is in a timed-parked (LockSupport.parkNanos) then Thread::getThread returns WAITING rather than TIMED_WAITING. The Thread::getState method was added for monitoring and management purposes but should be fixed. JVM TI GetThreadState has a similar issue. It returns the state with the JVMTI_THREAD_STATE_WAITING_INDEFINITELY rather than JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT bit set.
|