function Launch($max_chinds = 5, $child_exec_timeout = 0)
 {
     $proccess = new ReflectionClass("{$this->ProcessName}Process");
     $sig_handler = new ReflectionClass("SignalHandler");
     $PR = new ProcessManager($sig_handler->newInstance());
     $PR->SetChildExecLimit($child_exec_timeout);
     $PR->SetMaxChilds($max_chinds);
     if ($this->PIDDir) {
         $PR->SetPIDDir($this->PIDDir);
     }
     $PR->Run($proccess->newInstance());
 }
Exemple #2
0
 function Launch($max_chinds = 5, $child_exec_timeout = 0)
 {
     $proccess = new \ReflectionClass("{$this->ProcessName}Process");
     $sh = new \ReflectionClass('Scalr\\System\\Pcntl\\SignalHandler');
     $pm = new ProcessManager($sh->newInstance());
     $pm->SetChildExecLimit($child_exec_timeout);
     $pm->SetMaxChilds($max_chinds);
     if ($this->PIDDir) {
         $pm->SetPIDDir($this->PIDDir);
     }
     $pm->Run($proccess->newInstance());
 }