code: func (sq *servingQueue) queueLoop() {
  	for {
  		if sq.best != nil {
  			select {
  			case task := <-sq.queueAddCh:
  				sq.addTask(task)
  			case sq.queueBestCh <- sq.best:
  				if sq.queue.Size() == 0 {
  					sq.best = nil
  				} else {
  					sq.best, _ = sq.queue.PopItem().(*servingTask)
  				}
  			case <-sq.quit:
  				sq.wg.Done()
  				return
  			}
  		} else {
  			select {
  			case task := <-sq.queueAddCh:
  				sq.addTask(task)
  			case <-sq.quit:
  				sq.wg.Done()
  				return
  			}
  		}
  	}
  }
docs: // queueLoop is an event loop running in a goroutine. It receives tasks from queueAddCh
  // and always tries to send the highest priority task to queueBestCh. Successfully sent
  // tasks are removed from the queue.