PHPDaemon\Thread\Worker::setState PHP Метод

setState() публичный Метод

Set current status of worker
public setState ( $int ) : boolean
Результат boolean Success.
    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;
    }