Overview
ringbuf is a fixed-size ring buffer for Go, for 1 goroutine that pushes and 1 that pops, without locks.
main.go
b := ringbuf.New[int](1024)
b.Push(42)
v, ok := b.Pop() // 42, true
Concurrency explains what the buffer guarantees.
ringbuf is a fixed-size ring buffer for Go, for 1 goroutine that pushes and 1 that pops, without locks.
b := ringbuf.New[int](1024)
b.Push(42)
v, ok := b.Pop() // 42, true
Concurrency explains what the buffer guarantees.