Just to be clear, does synchronized(A) mean that we obtain exclusive access to A?
kayvonf
You can think of every object having an intrinsic lock, and synchronized taking that lock. In other words one thread can be holding that object's intrinsic lock at a time.
Just to be clear, does synchronized(A) mean that we obtain exclusive access to A?
You can think of every object having an intrinsic lock, and synchronized taking that lock. In other words one thread can be holding that object's intrinsic lock at a time.
https://docs.oracle.com/javase/tutorial/essential/concurrency/locksync.html