public function run() { $this->result = null; if ($this->cancelRun !== true) { try { $this->onRun(); } catch (\Throwable $e) { $this->crashed = true; $this->worker->handleException($e); } } $this->setGarbage(); }