Skip to content

Releases

v0.1.0

Choose a tag to compare

@changkun changkun released this 06 Jun 19:34

First release of the rewritten package — a near-complete overhaul of the 2019 v0.0.1 snapshot (which shipped only a root-package queue, stack, and AddFloat64). Every data structure is now generic (Go 1.26+), documents its precise non-blocking progress guarantee, and is grounded in a cited, peer-reviewed source (see REFERENCES.md).

Breaking changes

  • Reorganized by progress guarantee into two subpackages: lock-free in golang.design/x/lockfree/lf, wait-free in golang.design/x/lockfree/wf. The old root concrete types are removed (not aliased) — lockfree.NewQueue becomes lf.NewQueue, etc. The root now holds only shared helpers (Less, BinarySearch, AddFloat64) and the shared ADT interfaces.
  • Requires Go 1.26+ (generics).

Added — lock-free (lf)

  • Stack[T] (Treiber)
  • EliminationStack[T] (Hendler, Shavit & Yerushalmi elimination backoff)
  • Queue[T] (Michael & Scott)
  • Deque[T] (Sundell & Tsigas, single-word CAS)
  • SkipList[K,V] / OrderedMap[K,V] (Herlihy & Shavit; Get/Search wait-free)
  • List[K,V] (Harris / Michael), HashMap[K,V] (Michael), SplitHashMap[K,V] (Shalev & Shavit, resizable)

Added — wait-free (wf)

  • Queue[T] (Kogan & Petrank)
  • Stack[T] (Herlihy universal construction)
  • Deque[T] and Map[K,V] (universal construction over a persistent AVL tree; O(maxHandles · log n))
  • RingBuffer[T] (bounded SPSC)

Added — quality and tooling

  • Shared conformance suite running identical behavioral tests across every implementation of an ADT
  • Contention-swept benchmarks (mutex vs lock-free vs wait-free)
  • Differential and fuzz tests; CI runs build, -race, fuzz, and benchmark jobs
  • REFERENCES.md citing every implemented algorithm, verified against primary sources

Deferred

  • Lock-free bounded MPMC ring (Tsigas & Zhang, SPAA 2001): attempted, but the port is not yet faithful — it passes single-threaded and single-producer tests while reordering and stranding values under concurrent producers. Held back rather than shipping an unverified guarantee; see TODO.md.

Full changelog: v0.0.1...v0.1.0

v0.0.1

Choose a tag to compare

@changkun changkun released this 17 Jul 14:16
  • Lock-free FILO Stack, Push, Pop
  • Lock-free FIFO Queue, Enqueue, Dequeue
  • Lock-free arithmetic AddFloat64
⌂ 换网址