Exemplo n.º 1
0
 public function run()
 {
     $startTime = time();
     session_write_close();
     while (true) {
         foreach ($this->chunks as $chunkName => $chunk) {
             $chunk->run();
         }
         if ($this->isAnyData() or time() - $startTime > $this->timeout or $this->isInstantOutput) {
             JSON::jsonOutput($this->getOutputArray());
             break;
         }
         usleep($this->runInteval * 1000000);
     }
 }