Posts
Dealing with Mutation: Guarded Suspension
/
0 Comments
Guarded Suspension applies a unique strategy to deal with mutation. It signals when it is done with…
Dealing with Mutation: Locking
Locking is a classical way to protect a shared, mutable state. Today, I will present the two variants,…
Dining Philosophers Problem II
In the last post "Dining Philosophers Problem I", Andre Adrian started his analysis of the classical…
C++ Core Guidelines: Sharing Data between Threads
If you want to have fun with threads, you should share mutable data between them. To get no data race…
Thread-Safe Initialization of a Singleton
There are a lot of issues with the singleton pattern. I'm aware of that. But the singleton pattern is…
Prefer Locks to Mutexes
If the previous post showed something, it's that you should use mutexes with great care. That's why you…
The Risks of Mutexes
The usage of mutexes seems extremely simple. There is a critical section in the code that a single thread…