code: func (r *Ring) ContentSize() int {
  	r.Lock()
  	defer r.Unlock()
  
  	if r.head == -1 {
  		return 0
  	} else {
  		difference := (r.head - r.tail)
  		if difference < 0 {
  			difference += r.capacity()
  		}
  		return difference + 1
  	}
  }
docs: /*
  ContentSize returns the current number of elements inside the ring buffer.
  */