public function setPid($pid)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker pid after worker has started working');
        }

        $this->pid = (int)$pid;
    }
public function setPid($pid)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker pid after worker has started working');
        }

        $this->pid = (int)$pid;
    }
public function setPid ( $ pid ) { if ( $ this -> status != self :: STATUS_NEW ) { throw new \ RuntimeException ( 'Cannot set worker pid after worker has started working' ) ; } $ this -> pid = ( int ) $ pid ; }
Set the worker process id - this is done when
worker is loaded from memory

@param int $pid Set worker pid
Set the worker process id - this is done when worker is loaded from memory