isInterrupted

Thread 之 interrupt、isInterrupted、interrupted 方法

interrupt(): 打断 sleep、wait、join 的线程会抛出 InterruptedException 异常并清除打断标记,如果打断正在运行的线程、park 的线程则会重新设置打断标记isInterrupted(): 不会清除打断标记interrupted(): 会清除打断标记 一、 ......

8 Interrpt和IsInterrupted

# 8 Interrpt()和IsInterrupted() ## **interrupt()的效果** 如果被打断线程正在 sleep,wait,join 会导致被打断的线程抛出 InterruptedException,并清除 **打断标记**;如果打断的正在运行的线程,则会设置 **打断标记* ......
IsInterrupted Interrpt
共2篇  :1/1页 首页上一页1下一页尾页