acquire() public method

get a lock
public acquire ( boolean $blocking = true ) : boolean
$blocking boolean
return boolean
 public function acquire($server, $loop)
 {
     $lock = $this->sem->acquire(false);
     if ($lock) {
         return true;
     }
     return false;
 }
Ejemplo n.º 2
0
 public function testAcquireException()
 {
     $this->setExpectedException("RuntimeException");
     $this->lock->acquire();
     $this->lock->acquire();
 }