Skip to content

A multi-thread lock-free ring buffer implementation in C++

License

Notifications You must be signed in to change notification settings

dougct/ring-buffer

Repository files navigation

Ring buffer implementation in C++

This repository contains two implementations of ring buffers in C++:

  • A single-thread ring buffer to help us understand the challenges/tradeoffs of a real-world ring buffer.
  • A multi-thread implementation which is pretty similar to state-of-the-art implementations such as the one in folly.

Here's a blog post with a detailed description of each implementation.

How to build and run

To run the test for the single-thread ring buffer, do:

make test version=single

And just do make test to run the tests for the multi-thread ring buffer.

To run a simple benchmark, just do make bench.

About

A multi-thread lock-free ring buffer implementation in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published