The circular buffer that ships with Boost is great. However, it's not thread safe. This one is.
Developed against Boost 1.54 and tested with Boost 1.55.
It's a header file. Put the header file in an include directory and you should be good to go.
You'll also need Boost and CppUnit if you want to run the tests.
Test coverage is as good as I could think up. During development, I thought my tests covered every scenario but then in production my little buffer deadlocked. So I added more tests, found the problem and it's been smooth sailing ever since.
To run the tests you'll need a C++11 compiler and CppUnit.
make test
You'll probably have to twiddle the Makefile for your environment.
Speaking of environments, this has been tested on Linux and OSX, gcc/g++ and Clang.
The master
branch should compile on Linux, the wolverine
branch should
compile on OSX.
This is considered bug free and feature complete until new events warrant.
Released under the MIT license. Have at thee!
- Kurt Neufeld (https://github.com/kneufeld)
if you submit a patch make sure you append your name here