original_string: private function waitForAnyThread()
      {
          while (true) {
              foreach ($this->getPIDs() as $pid) {
                  if (!$this->isRunning($pid)) {
                      return;
                  }
              }
  
              # If none of the threads have finished let, wait for a second before checking again
              sleep(1);
          }
      }
code: private function waitForAnyThread()
      {
          while (true) {
              foreach ($this->getPIDs() as $pid) {
                  if (!$this->isRunning($pid)) {
                      return;
                  }
              }
  
              # If none of the threads have finished let, wait for a second before checking again
              sleep(1);
          }
      }
code_tokens: private function waitForAnyThread ( ) { while ( true ) { foreach ( $ this -> getPIDs ( ) as $ pid ) { if ( ! $ this -> isRunning ( $ pid ) ) { return ; } } # If none of the threads have finished let, wait for a second before checking again sleep ( 1 ) ; } }
docstring: If we've exhausted our limit of threads, wait for one to finish.
  
  @return void
docstring_tokens: If we ve exhausted our limit of threads wait for one to finish .