This is an implementation of a single producer, multi reader lockless ring buffer utilizing the new generics available in go 1.18. Instead of passing

GavinClarke0 / LocklessGenericRingBuffer Public

submited by
Style Pass
2022-01-20 20:30:10

This is an implementation of a single producer, multi reader lockless ring buffer utilizing the new generics available in go 1.18. Instead of passing typeless interface{} which we have to assert or deserialized []byte's we are able to pass serialized structs between go routines in a type safe manner.

This package goes to great lengths not to allocate in the critical path and thus makes 0 allocations once the buffer is created outside the creation of consumers.

Leave a Comment
Related Posts