Concurrency: Thread-safe Singletons
Love them or hate them, you just can not ignore singletons. Let’s try experimenting with singletons and concurrency.
Love them or hate them, you just can not ignore singletons. Let’s try experimenting with singletons and concurrency.
In continuation with the last week’s experiment on protecting shared data in a concurrent system, let’s look at how we can make it work using C++ and threads.
Few days back, I talked about designing Component System using Objective-C and message forwarding. Today, to carry the conversation forward, we shall see how can the same Component System be designed with C++, and also why C++ is a better language choice for such a design.
First step in getting with concurrency is spawning tasks in background thread.