A function is called on multiple threads and has a static local. It is extremely unlikely, but possible that it be called on 2 threads for the first time and the static variable initialized twice.
In old C++ this would be undefined behavior, I believe.
Does anyone know what the C++11 standard says about this? Are there memory barriers or anything to protect against this?