This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I know we can use depricated method 'stop()' to stop the thread.
But if I dont want to use any depricated method then how to kill a running thread??
There is a reason why stop() is deprecated. It is deprecated because when you force a thread to stop, instead of asking it to stop gracefully, you can leave variables in an indeterminate state -- as locks are forced to be released.
stop() is deprecated because there is no guaranteed safe way to force a thread to stop.