Is it possible to use other thread than DebuggerManagerThreadImpl to invoke JDI methods like invokeMethod?

Answered

Currently if I try to call JDI's invokeMethod in a thread which is not the DebuggerManagerThreadImpl, I get com.sun.jdi.IncompatibleThreadStateException. Is there any way to overcome this issue? I'd like to speed up things by calling invokeMethod on some objects in different threads.

0
4 comments
Avatar
Permanently deleted user

Hey, not quite, this is for speeding up calling many invokeMethods in parallel, and the other question is about aborting the invokeMethods if they take too long time. Related but totally different use cases. 

0

Hi, if all threads are suspended then this should be possible, see the javadoc for the invokeMethod:

IncompatibleThreadStateException – if the specified thread has not been suspended by an event.

0
Avatar
Permanently deleted user

OK. Thank you very much!

0

Please sign in to leave a comment.