【Singleton】单例模式、双检测锁定DCL、volatile(二) ctd and how to fix it (ctd)
Onthepreviouspage,welookedatwhydouble-checkedlockingisaproblem.Nowwelookatcorrectidiomsthatcanbeusedinstead.1.Justusesynchronization,stoopid...Itsoundsabitglib,butoneoptionistojustgoaheadandusethesync