interrupt字面上是中斷的意思,但在Java里Thread.interrupt()方法實際上通過某種方式通知線程,并不會直接中止該線程。具體做什么事情由寫代碼的人決定,通常我們會中止該線程。 如果線程在調用Object類的wait()、wait(long)或wait(long, int)方法,或者該類的 join() 、join(long) 、join(long, int) 、sleep(long...
www.dbjr.com.cn/article/364...htm 2025-5-18