Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/llamalad7/jetbrainsproject-mpscqueue
Small MPSC queue implementation as part of my JetBrains internship application.
https://github.com/llamalad7/jetbrainsproject-mpscqueue
Last synced: 4 days ago
JSON representation
Small MPSC queue implementation as part of my JetBrains internship application.
- Host: GitHub
- URL: https://github.com/llamalad7/jetbrainsproject-mpscqueue
- Owner: LlamaLad7
- Created: 2024-11-03T13:35:46.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-03T13:43:53.000Z (2 months ago)
- Last Synced: 2024-11-03T14:26:59.976Z (2 months ago)
- Language: Kotlin
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# MPSC Queue
This is a small implementation of a linearizable Multi-Producer-Single-Consumer concurrent queue in Kotlin using
AtomicFU.## Implementation
My implementation can be found
[here](https://github.com/LlamaLad7/JetBrainsProject-MPSCQueue/blob/main/src/main/kotlin/com/llamalad7/mpsc/MpscQueue.kt).
It is based on [this paper](https://www.cs.rice.edu/~johnmc/papers/cqueues-mellor-crummey-TR229-1987.pdf).
The queue is actually safe for use by multiple consumers, but they will block each other when consuming an element, so
it is best in a single-consumer setting.## Tests
The queue is tested with LinCheck
[here](https://github.com/LlamaLad7/JetBrainsProject-MPSCQueue/blob/main/src/test/kotlin/com/llamalad7/mpsc/MpscQueueTest.kt).