コード例 #1
0
 public function run($numWorkers)
 {
     $numWorkers = min(count($this->tests), $numWorkers);
     $this->listeners->begin($numWorkers, count($this->tests));
     for ($i = 0; $i < $numWorkers; $i++) {
         $process = new WorkerProcess($this->loop, $this->interpreterOptions, $i, $this->workerOptions);
         $process->addListener($worker = new WorkerTestExecutor($i, $this, $process));
         $this->runNextTestOn($worker);
         $this->workers[] = $worker;
     }
     $this->loop->run();
     $this->listeners->end();
 }
コード例 #2
0
 public function stop()
 {
     $this->process->stop();
 }