src/Util/Multithreading/Thread.php
public function getStatus() {
        if ($this->pid) {
            $waitPID = \pcntl_waitpid($this->pid, $status, WNOHANG);

            if ($waitPID == $this->pid) {
                return Thread::THREAD_EXITED;
            } else {
                return Thread::THREAD_RUNNING;
            }
        }
    }
public function getStatus() {
        if ($this->pid) {
            $waitPID = \pcntl_waitpid($this->pid, $status, WNOHANG);

            if ($waitPID == $this->pid) {
                return Thread::THREAD_EXITED;
            } else {
                return Thread::THREAD_RUNNING;
            }
        }
    }
public function getStatus ( ) { if ( $ this -> pid ) { $ waitPID = \ pcntl_waitpid ( $ this -> pid , $ status , WNOHANG ) ; if ( $ waitPID == $ this -> pid ) { return Thread :: THREAD_EXITED ; } else { return Thread :: THREAD_RUNNING ; } } }
Get the current status for this thread.
Get the current status for this thread .