- 출처 :
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.