2 ms·
The Wikipedia page on double checked locking[1] is pretty good. It's got a good discussion of this C++ problem (and how C++11 fixes it) as well as the problems
by nl 12y ago
The Wikipedia page on double checked locking[1] is pretty good. It's got a good discussion of this C++ problem (and how C++11 fixes it) as well as the problems in Java (prior to JDK 5).
[1] http://en.wikipedia.org/wiki/Double-checked_locking http://en.wikipedia.org/wiki/Double-checked_locking