在 Effective Java(第 275 页)中,有以下代码段:
...
for (int i = 0; i < concurrency; i++) {
executor.execute(new Runnable() {
public void run() {
ready.countDown();
try {
start.await();
action.run();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} finally {
done.countDown();
}
}
}
...
捕获中断的异常只是为了重新引发它有什么用?为什么不让它飞呢?