Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
スレッド T1 がスレッド T2 に参加するシナリオがあります。スレッド T2 が中断されるとどうなりますか。T1 が続行するか、T1 も中断されるか。
スレッドが別のスレッドに参加する場合、スレッドまで待機しますdie(仕様による)。したがって、何が起こっても、2 番目のスレッドが停止しても、待機中のスレッドは引き続き実行されます。
die
public final void join() は InterruptedException をスローします このスレッドが終了するのを待ちます。
public final void join() は InterruptedException をスローします
このスレッドが終了するのを待ちます。
それらの違いは何ですか、最初のものは本当に速く実行されますか?
for (x in myArray) { document.write(myArray[x] + "<br />") } for (i=0; i<myArray.length; i++) { document.write(myArr