java - Closing a thread that is currently running but has no loop -


while creating app have run issue of closing thread runs user inputted code using beanshell. thread.stop(); failed kill thread ideas? running code line @ time isn't plausible due loops in users code.

final thread thread = new thread() {     public void run() {         try {             interpreter.run();         } catch (runtimeexception runex) {             runex.printstacktrace();             log.d("end of bsh", "end of bsh");         }     } }; thread.start(); thread.interrupt(); 


Comments