Latest / Developer tools

Lockless Generic Ring Buffer

github.com · Open source · Quiet

Single-producer lockless ring buffer in Go using generics

Visit github.com ↗Share

  • ring buffer
  • generics
  • ringbuffer
  • lockless
  • go ring buffer
  • lockless queue
  • golang generics
Stars
165
Forks
7
Open issues
1
Last commit
Releases
6
Found
4 years ago

GitHub figures as of . They are context, not a ranking.

This Go library provides a lockless ring buffer with one publisher and multiple subscribers, built on the generics introduced in Go 1.18. Its maker reports it is faster than channels and type-safer than interface-based buffers. It suits Go developers who need fan-out message passing.

Repository description on GitHub: “Single producer and multi-reader lockless ring buffer in go using generics from the go 1.18.x release. It is significantly faster than channels with the added type safety of generics compared to ring buffers using interfaces.”

What it does

  • Single-producer lockless ring buffer for Go
  • Generic types for passing typed structs between goroutines
  • Zero heap allocations and no external dependencies

Good for

  • Fan out messages from one publisher to several subscribers in Go
  • Pass serialized structs between goroutines without interface values

Suits: Go developers who need fan-out message passing.

Worth knowing: Writers and consumers are not thread safe, so each consumer must stay in a single goroutine.

What you can try

Read the README on GitHub and install from source.

Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.

Found vs. released

Kip first saw Lockless Generic Ring Buffer on , when gavinclarke0 posted it to Show HN. The oldest published release on GitHub is v0.0.1, dated . Its first tagged release landed the same day it was found. 6 releases have been published in total; the latest is v0.1.2 ().

Day-7 and day-30 updates

Day 7 1 release shipped

  • 1 release in the first 7 days: v.0.0.2 (25 Jan 2022)
  • Show HN discussion at check time: 44 points, 22 comments. API record

Checked , later than day 7 because tracking began after.

Day 30 2 releases shipped

  • 2 releases in the first 30 days: v.0.0.2 (25 Jan 2022), v.0.0.3 (29 Jan 2022)
  • Show HN discussion at check time: 44 points, 22 comments. API record

Checked , later than day 30 because tracking began after.

Release timeline every entry links to its source

  1. Repository created on GitHub: GavinClarke0/LocklessGenericRingBuffer
  2. Release v0.0.1 (pre-release)
  3. Found: gavinclarke0 posted it to Show HN. Show HN
  4. Release v.0.0.2
  5. Release v.0.0.3
  6. Release v0.1.0
  7. Release v0.1.1
  8. Release v0.1.2
  9. Day-7 check recorded by Kip (details)
  10. Day-30 check recorded by Kip (details)

Quick answers

When was Lockless Generic Ring Buffer released?
Its first tagged release on GitHub is dated 20 Jan 2022. Kip found it on Show HN on 20 Jan 2022.
Is Lockless Generic Ring Buffer open source?
Its source is public on GitHub at GavinClarke0/LocklessGenericRingBuffer under the Apache-2.0 licence.
What does Lockless Generic Ring Buffer run on?
Library.
Is Lockless Generic Ring Buffer free?
It is open source, so the code is free to read and run; check the licence for terms.
Is Lockless Generic Ring Buffer still maintained?
It has had no commit or release for over a year as of the latest check.

Provenance

SourceRecordLast checked
Show HNlisting
official API record
GitHub repositoryGavinClarke0/LocklessGenericRingBuffer
REST API record
GitHub Releasesrelease list
REST API record

Stable ID hn-30014108. Summary written by KipFound’s editor.

Share

Similar tools

More in Developer tools

Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.