How does the Singleton pattern ensure thread-safety in a multi-threaded environment?
Singleton does not ensure thread safety; it relies on global variables that are shared by all threads.
Thatâ€™s incorrect. Singleton ensures thread-safety when implemented properly, typically using synchronization or double-checked locking.
Can you explain what thread safety means in the context of Singleton design?