Ejemplo n.º 1
0
 /**
  * @param Work $threaded Submit the work to the pool and will be dispatched among Pool's Workers
  * @return int|void
  */
 public function submit(\Threaded $threaded)
 {
     if (!$threaded instanceof VolatileAware) {
         throw new \InvalidArgumentException("Threadeds submitted to OnDemandePool should implement both PipeAware and VolatileAware");
     }
     ++$this->submitted;
     $threaded->setVolatile($this->getResultBag());
     parent::submit($threaded);
 }