public function setState($int)
    {
        if (Daemon::$compatMode) {
            return true;
        }
        if (!$this->id) {
            return false;
        }

        if (Daemon::$config->logworkersetstate->value) {
            $this->log('state is ' . Daemon::$wstateRev[$int]);
        }

        $this->state = $int;

        if ($this->reload) {
            $int += 100;
        }
        Daemon::$shm_wstate->write(chr($int), $this->id - 1);
        return true;
    }
public function setState($int)
    {
        if (Daemon::$compatMode) {
            return true;
        }
        if (!$this->id) {
            return false;
        }

        if (Daemon::$config->logworkersetstate->value) {
            $this->log('state is ' . Daemon::$wstateRev[$int]);
        }

        $this->state = $int;

        if ($this->reload) {
            $int += 100;
        }
        Daemon::$shm_wstate->write(chr($int), $this->id - 1);
        return true;
    }
public function setState ( $ int ) { if ( Daemon :: $ compatMode ) { return true ; } if ( ! $ this -> id ) { return false ; } if ( Daemon :: $ config -> logworkersetstate -> value ) { $ this -> log ( 'state is ' . Daemon :: $ wstateRev [ $ int ] ) ; } $ this -> state = $ int ; if ( $ this -> reload ) { $ int += 100 ; } Daemon :: $ shm_wstate -> write ( chr ( $ int ) , $ this -> id - 1 ) ; return true ; }
Set current status of worker
@param int Constant
@return boolean Success.
Set current status of worker