Use double-checked locking idiom + volatile optimization