std::locale/std::facet Critical section std::locale/std::facet Critical section multithreading multithreading

std::locale/std::facet Critical section


MSVC++'s std::locale is implemented in terms of the underlying C function setlocale. That touches global state, and must therefore be protected by a lock.

Changing the locking semantics of a data structure is unfortunately an ABI breaking change, so not much we'll be able to do about it for a while.