3 ms·
Bah! I know the JVM is now double-check-locking safe but http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html http://www.cs.umd.edu/~pugh/java
by sitkack 13y ago
Bah! I know the JVM is now double-check-locking safe but http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLo...
Just put a `synchronized` on it and call it good. The JVM is so damn fast, _nearly_ all the stuff in the Haggar book (Practical Java) is not applicable anymore.