re: 易中天品三国之“藐视”J2EE binge 2006-09-11 09:58
易老师不是说了吗?搞学问的就需要求甚解.
我们算是搞学问的吧
我也遇到了奇怪的问题,我配置的log一句话也不出来,log文件倒是建立了
如果楼上有解,能否给我点提示lazbean at hotmail dot com
@crazycy
nono,文章写到:
The issue of the failure of double-checked locking is not due to implementation bugs in JVMs but to the current Java platform memory model. The memory model allows what is known as "out-of-order writes" and is a prime reason why this idiom fails.
文章中说,基于java的内存模型,DCL并不是最安全的.最安全的是饿汉 和懒汉.
当然,懒汉很影响效率.