看板 java 關於我們 聯絡資訊
程式碼大概如下 try{ Thread.sleep(1000000); }catch (InterruptedException e){ System.out.println("test END"); } 黃色部分讓Thread睡覺是為了等待JAVA做類似常駐程式event-driven的事 但是讓程式強制停止後如何繼續執行印出的事?? @@ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.119.19.138
tkcn:keyword: wait 03/16 16:11
swenj:恩 我查察 03/16 16:12
swenj:嗯 還是不太懂 thread 03/16 16:46
sbrhsieh:可以讓別的 thread 來 interrupt停在blocking operation 03/17 19:47
sbrhsieh:的 thread 以離開 blocking 狀態。 03/17 19:56
gmoz:notify? 03/18 23:28