There is a big problem with Singletons especially in the C++ language. It is not obvious how to get them to work with multiple threads. You want one instance in your entire application and how do you handle the race condition when multiple threads ask for the instance at the same time?
...more
View all episodesBy Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes
4.8
111111 ratings
104: Multithreading. Singleton Mistakes.
There is a big problem with Singletons especially in the C++ language. It is not obvious how to get them to work with multiple threads. You want one instance in your entire application and how do you handle the race condition when multiple threads ask for the instance at the same time?