KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What are some recommended approaches to achieving thread-safe lazy initialization? For instance, // Not thread-safe public Foo getInstance(){ if(INSTANCE == null){ INSTANCE = new Foo(); } return INSTANCE; }
Tags (comma-separated)
Save Edits
Cancel