Entries by Rainer Grimm

Blocking and Non-Blocking Algorithms

Blocking, non-blocking, lock-free, and wait-free. Each of these terms describes a key characteristic of an algorithm when executed in a concurrent environment. So, reasoning about the runtime behavior of your program often means putting your algorithm in the right bucket. Therefore, this post is about buckets.

Race Conditions versus Data Races

Race conditions and data races are related but different concepts. Because they are related, they are often confused. In German, we even translate both expressions with the term kritischer Wettlauf. That is very bad. To reason about concurrency, your wording must be exact. Therefore, this post is about race conditions and data races.

C++17: New Parallel Algorithms of the Standard Template Library

The idea is quite simple. The Standard Template (STL) has more than 100 algorithms for searching, counting, and manipulating ranges and their elements. With C++17, 69 are overloaded, and a few new ones are added. The overloaded and new algorithm can be invoked with a so-called execution policy. By using the execution policy, you can […]

C++17 has a Visitor

What have std::optional, std::any, and std::variant in common? You can construct them in place. But that is not everything. A std::variant supports a visitor.