This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I want to kill a thread while executing after some time. How to kill the thread in middle. (stop and destroy methods are deprecated, so dont use)
If any body knows the solution plz help me
Sameer Amte
Ranch Hand
Joined: Oct 22, 2002
Posts: 38
posted
0
The above code should help in stopping a thread gracefully or in a forced mode. If your thread is in a wait state then an InterruptedException will be raised in which you should break out of your while loop to terminate your thread.
Pash Sonar
Greenhorn
Joined: May 25, 2005
Posts: 7
posted
0
Originally posted by Sameer Amte:
The above code should help in stopping a thread gracefully or in a forced mode. If your thread is in a wait state then an InterruptedException will be raised in which you should break out of your while loop to terminate your thread.