RFR: Debugger changes to support JVMTI now returning JVMTI_ERROR_UNSUPPORTED_OPERATION for Thread.stop() of a virtual thread.
Alan Bateman
alanb at openjdk.java.net
Fri Apr 15 11:42:52 UTC 2022
On Thu, 14 Apr 2022 23:11:36 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> Debugger changes to support JVMTI now returning JVMTI_ERROR_UNSUPPORTED_OPERATION for Thread.stop() of a virtual thread.
src/java.se/share/data/jdwp/jdwp.spec line 2029:
> 2027: "and the target VM does not support stopping it "
> 2028: "with an asynchronous exception at this time.")
> 2029: (Error INVALID_OBJECT "If thread is not a known ID or the asynchronous "
I think we can reduce this down to "The thread is a virtual thread and the target VM does not support the operation". The phrase "at this time" worked when it make have been dependent on whether the thread was at a breakpoint (or even the thread state) but I think it needs to be dropped now.
src/jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java line 130:
> 128: * @throws IllegalThreadStateException if the thread has terminated
> 129: * @throws java.lang.UnsupportedOperationException if the thread is a
> 130: * virtual thread that cannot be stopped with an asynchronous exception
Minor comment is that you can drop java.lang if you want as that packaged is always imported.
-------------
PR: https://git.openjdk.java.net/loom/pull/146
More information about the loom-dev
mailing list