protected function getNextWorker()
    {
        if ($this->nextWorkerAlgorithm !== null) {
            return call_user_func($this->nextWorkerAlgorithm, $this);
        } else {
            return $this->workers[mt_rand(0, $this->workerCount - 1)];
        }
    }
protected function getNextWorker()
    {
        if ($this->nextWorkerAlgorithm !== null) {
            return call_user_func($this->nextWorkerAlgorithm, $this);
        } else {
            return $this->workers[mt_rand(0, $this->workerCount - 1)];
        }
    }
protected function getNextWorker ( ) { if ( $ this -> nextWorkerAlgorithm !== null ) { return call_user_func ( $ this -> nextWorkerAlgorithm , $ this ) ; } else { return $ this -> workers [ mt_rand ( 0 , $ this -> workerCount - 1 ) ] ; } }
An algorithm for selecting workers

This default implementation will select the worker with the least number of stacked jobs
@return \Worker
An algorithm for selecting workers