Another LMAX disruptor port in go 1.8 with generics support.
LMAX disruptor is a High Performance Inter-Thread Messaging Library as an alternative to bounded queueu, which makes use of padding to avoid memory false sharing, alignment of memory in stripe to be cache friendly etc.
This is a port in Go with generics support, NOTE, Go's approach to concurrency is "Don't communicate by sharing memory; share memory by communicating". Channel is the prefered method for concurrency. This port follows disruptor's approach for better performance.
- install latest go lang binary (1.18.3 and above)
- install latest vs code
running all unit testing cases
go test -timeout 30s -tags -race goDisruptor/internal
go test -timeout 30s -tags -race goDisruptor/pkg
go test -timeout 30s -tags -race goDisruptor/example
running all performance testing benchmarks
go test -benchmem -run=^$ -tags -race -bench . goDisruptor/internal
go test -benchmem -run=^$ -tags -race -bench . goDisruptor/pkg
go test -benchmem -run=^$ -tags -race -bench . goDisruptor/example
Please refer to example
- 0.1
- Initial Release
- support more waiting strategies
- support publish N messages
- support consume N messages
- support proper DSL
- more examples
Distributed under the MIT License. See LICENSE.txt for more information.
Thanks to the LMAX-Disruptor project.