code: func (r *messageRing) Close() {
  	r.mu.Lock()
  	if r.closed {
  		r.mu.Unlock()
  		return
  	}
  
  	r.closed = true
  	r.wait.Broadcast()
  	r.mu.Unlock()
  }
docs: // Close closes the buffer ensuring no new messages can be added.
  // Any callers waiting to dequeue a message will be woken up.