每个线程都有一个与之相关联的 Bool ean 属性, 用于表示线程的中断状态(interrupted status) 。 中断状态初始时为 fal se; 当另一个线程通过调用 Thread.
基于12个网页-相关网页
The interrupted status of the current thread is cleared when this exception is thrown.
在抛出此异常时,当前线程的中断状态被清除。
If the task needs to be more responsive, it can poll the interrupted status more frequently.
如果任务需要提高响应能力,那么它可以更频繁地轮询中断状态。
When a blocking method detects interruption and throws InterruptedException, it clears the interrupted status.
当一个阻塞方法检测到中断并抛出InterruptedException时,它清除中断状态。
应用推荐