protected function spawnWorker() {
        $workerName = $this->worker;
        
        /** @var \CharlotteDunois\Phoebe\Worker  $worker */
        $worker = new $workerName(...$this->ctor);
        $this->messenger->prepareWorker($worker);
        
        $worker->start(static::WORKER_START_OPTIONS);
        $this->workers[$worker->id] = $worker;
        
        return $worker;
    }
protected function spawnWorker() {
        $workerName = $this->worker;
        
        /** @var \CharlotteDunois\Phoebe\Worker  $worker */
        $worker = new $workerName(...$this->ctor);
        $this->messenger->prepareWorker($worker);
        
        $worker->start(static::WORKER_START_OPTIONS);
        $this->workers[$worker->id] = $worker;
        
        return $worker;
    }
protected function spawnWorker ( ) { $ workerName = $ this -> worker ; /** @var \CharlotteDunois\Phoebe\Worker  $worker */ $ worker = new $ workerName ( ... $ this -> ctor ) ; $ this -> messenger -> prepareWorker ( $ worker ) ; $ worker -> start ( static :: WORKER_START_OPTIONS ) ; $ this -> workers [ $ worker -> id ] = $ worker ; return $ worker ; }
Spawns a new worker.
@return \CharlotteDunois\Phoebe\Worker
@throws \Throwable
Spawns a new worker .