一个例子说明Thread interrupt() interrupted() isInterrupted()三个方法关系和区别
直接贴上例子
public class InteruptTest extends Thread {
static int i = 0;
@Override
public void run() {
while (!Thread.currentThread().isInterrupted()) {
// i happy run , please break m...
原创
2015-07-05 16:45:08 ·
256 阅读 ·
0 评论