boolean flag=true;public void run(){
    while(flag){
        .......
    }
}上面是线程中的run方法,不干预则一直在线程循环中
停止只需要在外部改变flag=false,线程就自然终止了。