code: func (p *Pool) queryLoop() error {
  	if err := p.sendNextJobs(p.config.BatchSize); err != nil {
  		return err
  	}
  	for {
  		minWait := time.After(p.config.MinWait)
  		select {
  		case <-p.exit:
  			// Close the channel to tell workers to stop executing new jobs
  			close(p.jobs)
  			return nil
  		case <-minWait:
  			if err := p.sendNextJobs(p.config.BatchSize); err != nil {
  				return err
  			}
  		}
  	}
  	return nil
  }
docs: // queryLoop continuously queries the database for new jobs and, if
  // it finds any, sends them through the jobs channel for execution
  // by some worker.