WorkerPool.php
public function receiveMessage(&$worker)
    {
        $workers = $this->workers;
        Selectable::selectRead($workers, null);
        if (!count($workers)) {
            throw new Exception\RuntimeException('selectRead returned an empty array (this should not happen)');
        }
        $worker = reset($workers);

        return $worker->receiveMessage();
    }
public function receiveMessage(&$worker)
    {
        $workers = $this->workers;
        Selectable::selectRead($workers, null);
        if (!count($workers)) {
            throw new Exception\RuntimeException('selectRead returned an empty array (this should not happen)');
        }
        $worker = reset($workers);

        return $worker->receiveMessage();
    }
public function receiveMessage ( & $ worker ) { $ workers = $ this -> workers ; Selectable :: selectRead ( $ workers , null ) ; if ( ! count ( $ workers ) ) { throw new Exception \ RuntimeException ( 'selectRead returned an empty array (this should not happen)' ) ; } $ worker = reset ( $ workers ) ; return $ worker -> receiveMessage ( ) ; }
@param Worker $worker

@throws Exception\RuntimeException

@return mixed
@param Worker $worker