摘要: Thread.interrupted()和Thread.isInterrupted()和Thread.interrupt()异同 共性: 调用线程的interrupted()和isInterrupted()方法,只是接受了别的线程传过来的信号,给线程做了中断状态的标志,它们本身不能抛出Interru 阅读全文
posted @ 2021-01-28 18:15 lovelifest 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 线程的五种状态: 新建(NEW):新创建了一个线程对象。 可运行(RUNNABLE):线程对象创建后,其他线程(比如main线程)调用了该对象的start()方法。该状态的线程位于可运行线程池中,等待被线程调度选中,获取cpu 的使用权 。 运行(RUNNING):可运行状态(runnable)的线 阅读全文
posted @ 2021-01-28 18:10 lovelifest 阅读(180) 评论(0) 推荐(0) 编辑