Ko\ProcessManager::wait PHP Method

wait() public method

Suspends execution of the current process until all children has exited, or until a signal is delivered whose action is to terminate the current process.
public wait ( )
    public function wait()
    {
        while ($this->hasAlive()) {
            $this->dispatch();
            usleep(100000);
        }
    }

Usage Example

コード例 #1
0
 /**
  * {@inheritdoc} This dispatcher defers worker timeout to post-dispatch.
  *
  * @return void
  */
 public function run()
 {
     if ($this->manager->count() >= $this->max_workers) {
         $this->manager->wait();
     } elseif ($this->queue->count()) {
         $this->dispatch($this->queue->pop());
     }
 }
All Usage Examples Of Ko\ProcessManager::wait