public function Process::checkTimeout

Performs a check between the timeout definition and the time the process started.

In case you run a background process (with the start method), you should trigger this method regularly to ensure the process timeout

Throws

RuntimeException In case the timeout was reached

2 calls to Process::checkTimeout()
Process::start in drupal/core/vendor/symfony/process/Symfony/Component/Process/Process.php
Starts the process and returns after sending the STDIN.
Process::wait in drupal/core/vendor/symfony/process/Symfony/Component/Process/Process.php
Waits for the process to terminate.

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Process.php, line 1066

Class

Process
Process is a thin wrapper around proc_* functions to ease start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function checkTimeout() {
  if (0 < $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
    $this
      ->stop(0);
    throw new RuntimeException('The process timed-out.');
  }
}