提交 131dd96c authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 40b55573
...@@ -31,7 +31,15 @@ public class SelfDestructor extends Thread { ...@@ -31,7 +31,15 @@ public class SelfDestructor extends Thread {
Thread thread = new Thread() { Thread thread = new Thread() {
public void run() { public void run() {
for (int i = minutes; i >= 0; i--) { for (int i = minutes; i >= 0; i--) {
setName("SelfDestructor " + i + " min"); while (true) {
try {
String name = "SelfDestructor " + i + " min";
setName(name);
break;
} catch (OutOfMemoryError e) {
// ignore
}
}
try { try {
Thread.sleep(60 * 1000); Thread.sleep(60 * 1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论