Lock-free queue implementations for Nim.
Lock-free queues for Nim, implemented as ring buffers.
Three implementations are provided:
Sipsic
is a single-producer, single-consumer bounded queue. Pushing and popping are wait-free.Mupsic
is a multi-producer, single-consumer bounded queue. Popping is wait-free.Mupmuc
is a multi-producer, multi-consumer bounded queue.API documentation: https://elijahr.github.io/lockfreequeues
nimble install lockfreequeues
Examples are located in the examples directory and can be compiled and run with:
nimble examples
Many thanks to Mamy Ratsimbazafy for reviewing the initial release and offering suggestions.
Tests can be run locally with nimble test
.
CI runs the test suite for both C and C++ targets on:
x86_64
and aarch64
x86_64
The test suite is also run with LLVM thread sanitization to check for data races.
This project uses lintball to auto-format code. Please ensure your changeset passes linting. Enable the githooks with:
git config --local core.hooksPath .githooks