使用新線程並中止以前的線程

checkAndStopWorkingThread();
workingThread = new Thread() {
public void run() {
......
}

;
};
workingThread.start();
private void checkAndStopWorkingThread() {    if (workingThread != null) {        workingThread.stop();        workingThread = null;    }}
相關文章
相關標籤/搜索