Question: how to use kill thread?
Answer: It is simple. You can use any loop together with (volatile) boolean variable inside run() method to control thread's activity. You can also return from active thread to the main thread to stop it. This way you gracefully kill a thread :) .