Lock-free data structures and the C++26 hazard_pointer
The C++26 standard features a new header called <hazard_pointer> and a new class with the same name, which, together with hazard_pointer_obj_base, provides safe memory reclamation for lock-free data structures. In this article, we’ll see how all this works. The memory reclamation problem To understand why hazard_pointer exists, we first need to look at what makes … Read more