私には2つのスレッドがThread1
あり、Thread2
//Within Thread1
synchronized(obj1)
{
obj1 = null;
}
//Within Thread2
synchronized(obj1)
{
do something
}
jvm が最初に thread1 を実行し、obj1 を null に設定した場合、thread2 はその変更をすぐに確認しますか、それとも時間がかかりますが、obj1 がまだ null ではないため、jvm は引き続き thread2 の同期ブロックを実行できますか?