Skip to content

elijahr/lockfreequeues

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8bd679e · Sep 29, 2024
Sep 28, 2024
Nov 9, 2022
Jan 6, 2021
Sep 28, 2024
Sep 28, 2024
Jul 3, 2020
Dec 14, 2021
Jan 26, 2021
Jul 3, 2020
Sep 28, 2024
Jan 25, 2021
Jul 3, 2020
Sep 29, 2024
Jul 14, 2021
Sep 28, 2024
Dec 14, 2021

Repository files navigation

build

lockfreequeues

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

Installation

nimble install lockfreequeues

Examples

Examples are located in the examples directory and can be compiled and run with:

nimble examples

Reference

Many thanks to Mamy Ratsimbazafy for reviewing the initial release and offering suggestions.

Contributing

  • Pull requests and feature requests are welcome!
  • Please file any issues you encounter.
  • For pull requests, please see the contribution guidelines.

Running tests

Tests can be run locally with nimble test.

CI runs the test suite for both C and C++ targets on:

  • Linux x86_64 and aarch64
  • macOS x86_64

The test suite is also run with LLVM thread sanitization to check for data races.