Cisco interview question

Thread-safe singleton pattern - asked to write the code