[펌글] 스레드(Thread)를 종료하는 방법

By | 2월 17, 2012

- 출처 : 
http://www.herongyang.com/Java/Thread-interrupt-Method-to-Terminate-Thread.html -

There are 3 ways to terminate a thread:

  • The thread has finished the work it is designed to do, and exits the run() method naturally.
  • The thread has received an interruption signal, while doing its work. It decides to not continue with work and exits the run() method. It may also decide to ignore the signal and continue to work.
  • The thread has been marked as daemon thread. When the parent thread who created this thread terminates, this thread will be forcefully terminated by the JVM.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments