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(); }
public function stop() { $this->process->stop(); }