func ProducerFunc(rb *rb.RingBuffer, index, size int) { for i := 0; i < size; i++ { rb.Write(i) } }
func ConsumerFunc(rb *rb.RingBuffer, index, size int) { for i := 0; i < size; i++ { log.Println("[", index, "]: ", "consumer : ", i, ":", rb.Read()) rb.Read() } }