4 回答

慕码人8056858
TA贡献1803条经验 获得超6个赞
Thread.stop()

PIPIONE
TA贡献1829条经验 获得超9个赞
volatile boolean
I 不会boolean
volatile
while
某些阻塞库方法支持中断。
public void run() { try { while (!interrupted()) { // ... } } catch (InterruptedException consumed) /* Allow thread to exit */ }}public void cancel() { interrupt(); }
cancel()
添加回答
举报
0/150
提交
取消