src/Worker.php
protected function forkOneWorker()
    {
        $worker = $this;

        $process = new swoole_process(function (swoole_process $process) use ($worker) {
            swoole_set_process_name($worker->name . ':worker');

            call_user_func($worker->_work, $process);
        }, false, false);
        $pid = $process->start();
        if($pid === false) {
            return false;
        }

        $this->_workers++;
        $this->_workerProcesses[$pid] = $process;
        return true;
    }
protected function forkOneWorker()
    {
        $worker = $this;

        $process = new swoole_process(function (swoole_process $process) use ($worker) {
            swoole_set_process_name($worker->name . ':worker');

            call_user_func($worker->_work, $process);
        }, false, false);
        $pid = $process->start();
        if($pid === false) {
            return false;
        }

        $this->_workers++;
        $this->_workerProcesses[$pid] = $process;
        return true;
    }
protected function forkOneWorker ( ) { $ worker = $ this ; $ process = new swoole_process ( function ( swoole_process $ process ) use ( $ worker ) { swoole_set_process_name ( $ worker -> name . ':worker' ) ; call_user_func ( $ worker -> _work , $ process ) ; } , false , false ) ; $ pid = $ process -> start ( ) ; if ( $ pid === false ) { return false ; } $ this -> _workers ++ ; $ this -> _workerProcesses [ $ pid ] = $ process ; return true ; }
create a worker process
@return bool
create a worker process