RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is [v12]

David Holmes dholmes at openjdk.org
Mon Mar 18 02:43:29 UTC 2024


On Mon, 18 Mar 2024 00:12:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review: made current changes limitedto just RawMonitorWait
>
> src/hotspot/share/runtime/javaThread.cpp line 596:
> 
>> 594: // Checks and clears the interrupt status for platform or virtual thread.
>> 595: // Used by the JVMTI RawMonitorWait only.
>> 596: bool JavaThread::is_interrupted() {
> 
> Reading code that uses JavaThread::is_interrupted() won't be clear that it resets the interrupt status. Can this be something that get_and_clear_interrupted or something that makes it clearer?

Maybe `is_interrupted_with_reset`?  (though that would seem like an alias for `is_interrupted(true)`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18093#discussion_r1527693604


More information about the hotspot-runtime-dev mailing list