is there anyway to kill a thread or interrupt it immediately.
Like in one of my thread, i call a method which takes time to execute (2-4 seconds). This method is in a while(boolean flag) block, so i can interrupt it from the main thread.
But the problem is, if i interrupt it; it will wait till the executing loop is finished and then on next conditional check, it will stop execution.
I want it to stop right then. Is there anyway to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…