the project occasionally fails to respond when calling a WebService interface (wsimport mode) (showing that the program keeps blocking and does not throw any exceptions). Check the stack information as shown in the figure
.the solution now is to create a child thread to call WS,. If the call does not respond (the main thread waits for timeout), it terminates the child thread
because the thread state is always Runnable, and is not a loop, it is not possible to interrupt the thread with interrupt ()
. In this case, is it appropriate to use stop ()
to terminate the thread? Is there a better solution?
call WS thread stack information: