src/Pcntl/Thread.php
public function isAlive()
    {
        $pid = pcntl_waitpid($this->_pid, $status, WNOHANG);
        $this->result = unserialize(trim(socket_read($this->sockets[1], $this->message_length)));
        socket_close($this->sockets[1]);

        return ($pid === 0);
    }
public function isAlive()
    {
        $pid = pcntl_waitpid($this->_pid, $status, WNOHANG);
        $this->result = unserialize(trim(socket_read($this->sockets[1], $this->message_length)));
        socket_close($this->sockets[1]);

        return ($pid === 0);
    }
public function isAlive ( ) { $ pid = pcntl_waitpid ( $ this -> _pid , $ status , WNOHANG ) ; $ this -> result = unserialize ( trim ( socket_read ( $ this -> sockets [ 1 ] , $ this -> message_length ) ) ) ; socket_close ( $ this -> sockets [ 1 ] ) ; return ( $ pid === 0 ) ; }
Checks if the child thread is alive

@return boolean
Checks if the child thread is alive