でnullが、私はこれを参照してください。これは問題ありませんか? (スレッド)同期化、スレッド=同期ブロック
// thread is a member of this class
synchronized(this.thread)
{
this.thread.running = false;
this.thread.notifyAll(); // Wake up anything that was .waiting() on
// the thread
this.thread = null; // kill this thread reference.
// can you do that in a synchronized block?
}
は、それはまだそれにロックを保持したままthread=null
を設定しても大丈夫ですか?
このナゲットは少しBBコードで見つかりました。
Thread.interrupt()を使用していない理由はありますか?これは、基礎となるライブラリでサポートされていますか? –