ZenQ icon indicating copy to clipboard operation
ZenQ copied to clipboard

A thread-safe queue faster and more resource efficient than golang's native channels

Results 7 ZenQ issues
Sort by recently updated
recently updated
newest added

Hi, here is some feedback for you to get results on different architecture Ubuntu 22.04 AMD Ryzen Threadripper 3960X 128 GB RAM Simple ``` ~/go/pkg/mod/github.com/alphadose/[email protected]$ go run benchmarks/simple/main.go With Input...

If this is really fast and without downsides, should this be in Go core? Maybe folks in go-dev google group will get interest.

Could you please explain: 1. Why there is padding at the beggining of ZenQ structure? ```go // ZenQ is the CPU cache optimized ringbuffer implementation ZenQ[T any] struct { //...

how to get queue length?

Had a section of code which pulls a value from a zenq queue: ```go if dat := zenq.Select(b.notifyQ, b.writeQ); dat != nil { switch dat.(type) { case *bounceNofity: switch dat.(*bounceNofity).event...

cpu 100% even no data is processing

Simple clone of the current main branch on Go version 1.19.4. Maybe I'm missing some hidden snowflake? ``` ZenQ git:(main) go run examples/simple/main.go # github.com/alphadose/zenq/v2 ./zenq.go:94:6: array length constants.CacheLinePadSize -...