original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Removes closed threads from queue
docstring_tokens: Removes closed threads from queue