code: func (eq *eventQueue) next() []Event {
  	eq.mu.Lock()
  	defer eq.mu.Unlock()
  
  	for eq.events.Len() < 1 {
  		if eq.closed {
  			eq.cond.Broadcast()
  			return nil
  		}
  
  		eq.cond.Wait()
  	}
  
  	front := eq.events.Front()
  	block := front.Value.([]Event)
  	eq.events.Remove(front)
  
  	return block
  }
docs: // next encompasses the critical section of the run loop. When the queue is
  // empty, it will block on the condition. If new data arrives, it will wake
  // and return a block. When closed, a nil slice will be returned.