code: func (sq *servingQueue) threadController() {
  	for {
  		token := make(runToken)
  		select {
  		case best := <-sq.queueBestCh:
  			best.tokenCh <- token
  		default:
  			select {
  			case best := <-sq.queueBestCh:
  				best.tokenCh <- token
  			case sq.tokenCh <- token:
  			case <-sq.stopThreadCh:
  				sq.wg.Done()
  				return
  			case <-sq.quit:
  				sq.wg.Done()
  				return
  			}
  		}
  		<-token
  		select {
  		case <-sq.stopThreadCh:
  			sq.wg.Done()
  			return
  		case <-sq.quit:
  			sq.wg.Done()
  			return
  		default:
  		}
  	}
  }
docs: // threadController is started in multiple goroutines and controls the execution
  // of tasks. The number of active thread controllers equals the allowed number of
  // concurrently running threads. It tries to fetch the highest priority queued
  // task first. If there are no queued tasks waiting then it can directly catch
  // run tokens from the token channel and allow the corresponding tasks to run
  // without entering the priority queue.