When I want to kill a thread I create a method that when I call it, it prepares the thread to kill it
check this code, and if you have doubts, tell me
boolean finish = false;
void run(){
while(!finish ){
//process
}
//clean resources
}
public void finish Thread(){
this.finish = true;
}
bye