intertupt(), interrupted()和isInterrupted()区别

interrupt()用来更改中断状态位,设置为true,并且抛出InterruptedException异常,之后reset中断状态位为true,具体如何中断的这个行为得自己在catch()里实现,例子如下: interrupted()和isInterrupted()区别如下: 后者为Thead类的静态函数
相关文章
相关标签/搜索