blob: aaf8c51d448fa4deb52fd5a26fcdc1c1ec6a2272 [file] [log] [blame]
package main
import "github.com/smartystreets/go-disruptor"
func publish(writer *disruptor.Writer) {
for {
if lower, upper := writer.Reserve(ItemsToPublish); upper != disruptor.Gating {
for sequence := lower; sequence <= upper; sequence++ {
ringBuffer[sequence&RingMask] = sequence
}
writer.Commit(lower, upper)
}
}
}