protected function createSwooleProcess()
    {
        $process = new SwooleProcess(function ($process) {
            $this->running = true;

            $process->name(sprintf('%s : Process %s', $this->app->name(), $this->getName() ?: $process->pid));

            $this->dispatchEvent('Start', $this->server, $this);

            swoole_event_add($this->swooleProcess->pipe, function () {
                if (false !== ($data = $this->swooleProcess->read())) {
                    $this->dispatchEvent('Message', $this->server, $this, $data);
                }
            });

            call_user_func($this->runnableRetriever(), $this->server, $this);
        }, false, true);

        $process->setBlocking($this->isBlocking());

        return $process;
    }