• Post Reply Bookmark Topic Watch Topic
  • New Topic

Threads

 
raghuram bikkani
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can u stop running Thread?
 
Peter Chase
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!