private function cleanup()
    {
        foreach ($this->threads as $i => $szal)
            if (!$szal->isAlive()) {
                $this->results[] = $this->threads[$i]->result;
                unset($this->threads[$i]);
            }
        return count($this->threads);
    }
private function cleanup()
    {
        foreach ($this->threads as $i => $szal)
            if (!$szal->isAlive()) {
                $this->results[] = $this->threads[$i]->result;
                unset($this->threads[$i]);
            }
        return count($this->threads);
    }
private function cleanup ( ) { foreach ( $ this -> threads as $ i => $ szal ) if ( ! $ szal -> isAlive ( ) ) { $ this -> results [ ] = $ this -> threads [ $ i ] -> result ; unset ( $ this -> threads [ $ i ] ) ; } return count ( $ this -> threads ) ; }
Removes closed threads from queue
Removes closed threads from queue