コード例 #1
0
ファイル: Worker.php プロジェクト: kicken/gearman-php
 /**
  * Go into a loop accepting jobs and performing the work.
  */
 public function work()
 {
     if (empty($this->workerList)) {
         throw new NoRegisteredFunctionException();
     }
     if (!$this->stop) {
         $this->grabJob();
         while (!$this->stop) {
             $packet = $this->connection->readPacket();
             $this->processPacket($packet);
         }
     }
 }
コード例 #2
0
ファイル: Client.php プロジェクト: kicken/gearman-php
 private function packetIteration()
 {
     $packet = $this->connection->readPacket();
     $this->processPacket($packet);
 }