When a thread is alive, how can I stop the thread? I have given like
if(thread.isAlive()){ thread.stop(); }
but the method stop is depr
In a non looping thread implmentation, you can always use some thing like this at the very beginning of thread code as:
void run() { if (!shouldContinue) { return 1; } .. then rest of the thread code .. }