起因 看代码的时候发现sleep时会catch一个InterruptedException, 但是在catch block里又调用了 Thread.currentThread().interrupt(); 一开始并不理解此处interrupt()用意,查阅后发现 interrupt方法只对阻塞状态下的线程触发InterruptedException, Thread.interrupt() and InterruptedException 赞微海报分享
近期评论