• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to kill a thread????

 
Yaroslav Chinskiy
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i need to write an ObjectCache that would store running threads. Each thread does something. If the thread's time to live expiers I want to kill it.
I can not modifiy the thread.
The stop() is depricated, and destroy() does not work.
What can i do???

 
Iain Lowe
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Why Are Thread.stop, Thread.suspend,
Thread.resume and Runtime.runFinalizersOnExit Deprecated?
. This has a section labeled "What should I use instead of Thread.stop()?"
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!