src/ForkManager.php
protected function runJob() {
        if (isset($this->callbackChildren[$this->uid])) {
            $callback = $this->callbackChildren[$this->uid];
            $result = $callback->call($this->callbackParamChildren[$this->uid]);
        } else if ($this->callback) {
            $result = $this->callback->call($this->callbackParam);
        } else {
            $result = null; // no job
        }
        if ($this->getShareResult()) {
            $this->getStorage()->write($this->uid, $result);
        }
        posix_kill($this->pid, 9);
    }
protected function runJob() {
        if (isset($this->callbackChildren[$this->uid])) {
            $callback = $this->callbackChildren[$this->uid];
            $result = $callback->call($this->callbackParamChildren[$this->uid]);
        } else if ($this->callback) {
            $result = $this->callback->call($this->callbackParam);
        } else {
            $result = null; // no job
        }
        if ($this->getShareResult()) {
            $this->getStorage()->write($this->uid, $result);
        }
        posix_kill($this->pid, 9);
    }
protected function runJob ( ) { if ( isset ( $ this -> callbackChildren [ $ this -> uid ] ) ) { $ callback = $ this -> callbackChildren [ $ this -> uid ] ; $ result = $ callback -> call ( $ this -> callbackParamChildren [ $ this -> uid ] ) ; } else if ( $ this -> callback ) { $ result = $ this -> callback -> call ( $ this -> callbackParam ) ; } else { $ result = null ; // no job } if ( $ this -> getShareResult ( ) ) { $ this -> getStorage ( ) -> write ( $ this -> uid , $ result ) ; } posix_kill ( $ this -> pid , 9 ) ; }
Run the fork job
Run the fork job