synchronisiertes Objekt auf null gesetzt
Ich habe zwei FädenThread1
undThread2
<code>//Within Thread1 synchronized(obj1) { obj1 = null; } //Within Thread2 synchronized(obj1) { do something } </code>
Wenn jvm zuerst thread1 ausführt und obj1 auf null setzt, wird thread2 diese Änderung sofort sehen oder wird es einige Zeit dauern und jvm könnte den synchronisierten Block thread2 noch ausführen, da obj1 noch nicht null ist?