Thread-safe initializations of some static variables