I read that even 'double checked locking' is not
thread safe. Thread one can get out of synchronized block before JVM assign instance to
singleton reference, in that case, thread two will enter into synchronized block and pass the if condition (as
singleton is not initialized) and create another instance.
If that can happen then *anything* can happen.
JVM is supposed to execute code sequentially until it's specified NOT to do so.
I am totally lost now.
[ June 06, 2007: Message edited by: ankur rathi ]