Kohkimakimoto\Worker\Worker::shutdown PHP Method

shutdown() public method

Shoutdown process.
public shutdown ( ) : void
return void
    public function shutdown()
    {
        if ($this->masterPid === posix_getpid() && !$this->finished) {
            // only master process.
            $this->dispatcher->dispatch(WorkerEvents::SHUTTING_DOWN, new WorkerShuttingDownEvent($this));
            $this->output->writeln("<info>Shutdown <comment>" . $this->config->getName() . "</comment>.</info>");
            $this->finished = true;
        }
    }