AI Features

Lock-free Programming

Learn about lock-free programming and a simple lock-free queue implementation, which is useful for real-time audio.

We'll cover the following...

Lock-free programming is hard. We will not spend a lot of time discussing lock-free programming in this course, but instead, we will provide an example of how a very simple lock-free data structure could be implemented. Some concepts you might have heard of, such as compare-and-swap (CAS) and the ABA problem, will not be further discussed in this course.

Example: A lock-free queue

Here, ...