예제 #1
0
 protected function start() : array
 {
     $count = \max(1, $this->workerCount ?? LoopConfig::getCpuCount());
     $starting = [];
     for ($i = 1; $i <= $count; $i++) {
         $starting[] = $this->spawnWorker($i);
     }
     return $starting;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public static function getMaxSize() : int
 {
     return LoopConfig::getCpuCount() * 2;
 }