Ko\ProcessManager::count PHP Method

count() public method

Return count of currently running child process.
public count ( ) : integer
return integer
    public function count()
    {
        return count($this->children);
    }

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());
     }
 }