在Javadoc中
Thread.sleep(由调用
TimeUnit.sleep):
InterruptedException-如果任何线程中断了当前线程。引发此异常时,将清除当前线程的中断状态。
我认为的目的
isInterrupted()是让您 在 调用可能引发的事件 之前
检测线程是否已中断
InterruptedException。如果您 抓到了
InterruptedException,可以公平地假设线程 已
被中断…

在Javadoc中
Thread.sleep(由调用
TimeUnit.sleep):
InterruptedException-如果任何线程中断了当前线程。引发此异常时,将清除当前线程的中断状态。
我认为的目的
isInterrupted()是让您 在 调用可能引发的事件 之前
InterruptedException。如果您 抓到了
InterruptedException,可以公平地假设线程 已