摘要: 1. 线程的取消和中断 interrupt() 中断线程,本质是将线程的中断标志位设为true,其他线程向需要中断的线程打个招呼。是否真正进行中断由线程自己决定 isInterrupted() 线程检查自己的中断标志位 静态方法Thread.interrupted() 将中断标志位复位为false 阅读全文
posted @ 2021-01-29 18:05 agasha 阅读(477) 评论(0) 推荐(0) 编辑