RFR: 8325187: JVMTI GetThreadState says virtual thread is JVMTI_THREAD_STATE_INTERRUPTED when it no longer is [v12]
Serguei Spitsyn
sspitsyn at openjdk.org
Mon Mar 18 11:14:28 UTC 2024
On Mon, 18 Mar 2024 02:21:40 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> 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)`.
Thanks, Alan and David. Will consider your suggestions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18093#discussion_r1528336441
More information about the hotspot-runtime-dev
mailing list