lockfreequeues

Compatibility facade for lockfree — lock-free queues for Nim.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 5.1.8
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-11-17 13:49

Authors

  • Elijah Shaw-Rutschman

Installation

nimble install lockfreequeues
choosenim install lockfreequeues
git clone https://github.com/elijahr/lockfreequeues

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
lockfreequeues ✓ ✓ ✓ - - - - - - -

Dependencies

Package Version Optional
nim >= 2.2.10 No
unittest2 - No
lockfree >= 0.6.7 & < 0.7.0 No
typestates >= 0.14.1 No

Source

Repository https://github.com/elijahr/lockfreequeues
Homepage https://github.com/elijahr/lockfreequeues
Registry Source nimble_official

README

lockfreequeues (Compatibility Facade)

[!IMPORTANT] Package Consolidated into lockfree
As of version 5.1.0, lockfreequeues and nim-debra have been unified into a single high-performance library: lockfree.
This repository is maintained strictly as a zero-overhead backwards-compatibility facade mapping historical types to canonical lockfree engines.
All new projects and active development should depend directly on lockfree.

Docs Migration Guide License: MIT


What is this package?

lockfreequeues continues to exist on Nimble so that existing projects do not break. Under the hood, version 5.1.0+ forwards all calls directly to the unified lockfree engine:

# Existing code continues to compile with zero changes:
import lockfreequeues

var q = newSipsicQueue[int, 16]()
discard q.push(42)
assert q.pop().get == 42

Legacy API Mapping

All historical types, constructors, and endpoints are 100% supported:

Legacy Type Parameters Modern lockfree Equivalent
Sipsic[N, T] Capacity N, Type T BQueue[T, ccSingle, ccSingle, N, 0, 0] (newSpscQueue)
Mupsic[N, P, T] Capacity N, Producers P, Type T BQueue[T, ccMulti, ccSingle, N, P, 0] (newMpscQueue)
Sipmuc[N, C, T] Capacity N, Consumers C, Type T BQueue[T, ccSingle, ccMulti, N, 0, C] (newSpmcQueue)
Mupmuc[N, P, C, T] Capacity N, Producers P, Consumers C, Type T BQueue[T, ccMulti, ccMulti, N, P, C] (newMpmcQueue)
UnboundedSipsic[T, ST, S] Type T, Strategy ST, Segment S Queue[T, ccSingle, ccSingle, ST, S, 1]
UnboundedMupsic[T, ST, S, M] Type T, Strategy ST, Segment S, MaxThreads M Queue[T, ccMulti, ccSingle, ST, S, M]
UnboundedSipmuc[T, ST, S, M] Type T, Strategy ST, Segment S, MaxThreads M Queue[T, ccSingle, ccMulti, ST, S, M]
UnboundedMupmuc[T, ST, S, M] Type T, Strategy ST, Segment S, MaxThreads M Queue[T, ccMulti, ccMulti, ST, S, M]

Upgrading to lockfree

To take advantage of modern features (CSP Channel[T] facade, cross-language C ABI, Apple Silicon cacheline tuning, and batch pop primitives), migrate your dependency in .nimble:

# In your .nimble file:
requires "lockfree >= 0.1.0"
# In your code:
import lockfree
import lockfree/channel

var chan = newBoundedChannel[int](64)
assert chan.send(42)

Read the full Migration Guide and Documentation.