I have one single thread created, and a method will call this thread to .start()
, this method might be called again before the thread finishes its work.
i added a return;
inside the run()
, so it will die when it finishes its work and be started again. But it gives me a IllegalThreadStateException
when i try to start it after its work is done. Is the thread not shutting down? I thought adding a return;
would shut it down.