Embed presentation
Download as PDF, PPTX



























































The document discusses patterns for lazy initialization in concurrent programming. It presents the naive lazy initialization approach, which is not thread-safe, and several attempted fixes that have issues. A better approach is eager initialization, where the instance is initialized during static initialization for thread safety and no performance penalty of synchronization. For non-singletons, the holder pattern provides a thread-safe lazy initialization approach.

























































