code: protected function wait()
      {
          $timer = 0;
          $timeout = $this->getMaxWait();
          $interval = 50;
          $uSleep = $interval * 1000;
  
          while ($timer <= $timeout) {
              // 等到了可用的空闲资源
              if ($res = $this->getFreeQueue()->pop()) {
                  return $res;
              }
  
              $timer += $interval;
              usleep($uSleep);
          }
  
          return false;
      }
docs: 等待并返回可用资源
  @return bool|mixed