Posts

DealingWithMutation

Dealing with Mutation: Guarded Suspension

/
Guarded Suspension applies a unique strategy to deal with mutation. It signals when it is done with…
DealingWithMutation

Dealing with Mutation: Locking

/
Locking is a classical way to protect a shared, mutable state. Today, I will present the two variants,…
An illustration of the dining philosophers problem

Dining Philosophers Problem II

/
In the last post "Dining Philosophers Problem I", Andre Adrian started his analysis of the classical…
retriever

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…
gcc

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…
deadlockResolved

Prefer Locks to Mutexes

/
If the previous post showed something, it's that you should use mutexes with great care. That's why you…
Deadlock

The Risks of Mutexes

/
The usage of mutexes seems extremely simple. There is a critical section in the code that a single thread…