https://github.com/chrishulbert/spsc
Single Producer Single Consumer queue in C
https://github.com/chrishulbert/spsc
Last synced: 17 days ago
JSON representation
Single Producer Single Consumer queue in C
- Host: GitHub
- URL: https://github.com/chrishulbert/spsc
- Owner: chrishulbert
- License: mit
- Created: 2026-05-13T09:09:05.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-13T12:16:27.000Z (2 months ago)
- Last Synced: 2026-05-13T14:23:58.158Z (2 months ago)
- Language: C
- Homepage: https://www.splinter.com.au/2026/05/13/lockless-spsc-queue/
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SPSC
Lockless Single Producer Single Consumer queue in C

This is a simple C implementation of a lockless SPSC queue algorithm, most commonly used for communicating to hard-real-time audio threads.
Documentation can be found here: [splinter.com.au/2026/05/13/lockless-spsc-queue](https://www.splinter.com.au/2026/05/13/lockless-spsc-queue/).
To run, simply do:
make run
This is less a library than sample code that you are encouraged to copy and paste into your project, modifying `QueueEntry` to suit the items you want to put in your queue.
Extracted from [BrickWarrior](https://github.com/chrishulbert/brickwarrior)'s sound engine.
