AppsFlyer interview question

Write a singleton. Make it Thread-safe.