Ko\ProcessManager::count PHP 메소드

count() 공개 메소드

Return count of currently running child process.
public count ( ) : integer
리턴 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());
     }
 }