Chapter 7. Designing lock-free concurrent data structures

This chapter covers
  • Implementations of data structures designed for concurrency without using locks
  • Techniques for managing memory in lock-free data structures
  • Simple guidelines to aid in the writing of lock-free data structures

In the last chapter we looked at general aspects of designing data structures for concurrency, with guidelines for thinking about the design to ensure they’re safe. We then examined several common data structures and looked at example implementations that used mutexes and locks to protect the shared data. The first couple of examples used one mutex to protect the entire data structure, but later ones used more than one to protect various ...

Get C++ Concurrency in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.