我实际上可以正确暂停线程,但是当我按下取消暂停按钮时它不会恢复。我究竟做错了什么 ?
public void pause() {
mRun = false;
while (true) {
try {
_thread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
break;
}
_thread = null;
}
public void unpause() {
mRun = true;
_thread = new GameBoardThread(this);
_thread.start();
}