This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can u stop running Thread?
 
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very common question. you should search JavaRanch and/or the Web for answers.

The quick answer is that you cannot forcibly stop one running thread from another. You must not use the method Thread.stop(), as it is seriously broken. You must design and implement a way for the threads to cooperate in a shut-down procedure. The aforementioned search will show you a variety of ways that can be achieved.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!