Entries by Rainer Grimm

My ALS Journey (24/n): Cippi’s World Tour

Many of you want to get in touch with Cippi. So here is a brief overview of her travel plans for 2025. >> My ALS Journey so far << Cippi’s World Tour in 2025 These are the C++ conferences that Cippi will be attending. C++ Conferences If you would like Cippi to visit your conference, […]

Data-Parallel Types (SIMD)

The data-parallel types (SIMD) library provides data-parallel types and operations on them. Today, I want to take a closer look at this. Before diving into the new library, I would like to take a moment to discuss SIMD. SIMD Vectorization refers to the SIMD (Single Instruction, Multiple Data) extensions of a modern processor’s instruction set. […]

Read-copy-update (RCU)

Read-copy-update is strong in multithreading environments where a data structure is read almost exclusively but rarely written. First of all, what is RCU? The excellent Wikipedia page on Read-copy-update provides a good introduction: In computer science, read-copy-update (RCU) is a synchronization mechanism that avoids the use of lock primitives while multiple threads concurrently read and […]

atomic<shared_ptr<>> by Oliver Schädlich

This blog article is an experiment. A few days ago, I received the following email (translated from German) from Oliver Schädlich (oliver.schaedlich@gmail.com). If, as I hope, this article sparks a discussion, I will be happy to summarize it in my last article. Please send an email to: Rainer.Grimm@ModernesCpp.de. I just read your latest article on […]

My ALS Journey (23/n): Cippi

Let me introduce Cippi. I hope you like her. You probably already know her from my C++ books. >> My ALS Journey so far << Cippi I’m Cippi: curious, clever, and—yes—feminine! You’re probably wondering why I’m mentioning Cippi here. The reason is simple. Since I can no longer attend C++ conferences myself, I will be […]

Hazard Pointers in C++26

Hazard pointers provide garbage collection in C++ and solve the ABA problem. First of all. What is a hazard pointer? Proposal P2530R3 gives a nice explanation: A hazard pointer is a single-writer multi-reader pointer that can be owned by at most one thread at any time. Only the owner of the hazard pointer can set […]

My ALS Journey (22/n): Call for Collaboration

Today, I have a special call for collaboration. >> My ALS Journey so far << My Challenge My writing skills are very poor, but my speaking is pretty good. I use my voice to write articles or programs. Dictating is very cumbersome and error-prone, and it takes four times as long to write a blog […]

A Lock-Free Stack: A Hazard Pointer Implementation Explained II

In my last post, I started to explain a hazard pointer implementation: A Lock-Free Stack: A Hazard Pointer Implementation Explained I. Today, I will continue to explain the implementation. The Retire List The retire list has the public member functions isInUse, addNode, and deleteUnusedNodes. Additionally, it has the inner class RetireNode, an atomic member of […]

A Lock-Free Stack: A Hazard Pointer Implementation Explained I

In my last post, I presented a hazard pointer implementation: A Lock-Free Stack: A Hazard Pointer Implementation. Today, I will explain the implementation. MyNode is a class template, parametrized by the type it holds: data. MyNode models the concept Node. template <typename T> concept Node = requires(T a) { {T::data}; { *a.next } -> std::same_as<T&>; […]

My ALS Journey (21/n): ALS Fundraiser by Jen and Jason

Today, I want to present you something special. >> My ALS Journey so far << ALS Fundraiser by Jen and Jason https://x.com/lefticus/status/1895996735610032400 I cannot express how happy I am to have such friends! Jen and Jason, have a good journey. From one Week to two Weeks You may have already noticed. I will change my […]