src/Rairlie/LockingSession/Lock.php
public function acquire()
    {
        if ($this->lockfp) {
            $this->log("acquire - existing lock");
            return;
        }

        $this->openLockFile();
        $this->log("acquire - try lock");
        flock($this->lockfp, LOCK_EX);
        $this->log("acquire - got lock");
    }
public function acquire()
    {
        if ($this->lockfp) {
            $this->log("acquire - existing lock");
            return;
        }

        $this->openLockFile();
        $this->log("acquire - try lock");
        flock($this->lockfp, LOCK_EX);
        $this->log("acquire - got lock");
    }
public function acquire ( ) { if ( $ this -> lockfp ) { $ this -> log ( "acquire - existing lock" ) ; return ; } $ this -> openLockFile ( ) ; $ this -> log ( "acquire - try lock" ) ; flock ( $ this -> lockfp , LOCK_EX ) ; $ this -> log ( "acquire - got lock" ) ; }
Acquire an exclusive lock. Will block if locked by another process.
Acquire an exclusive lock . Will block if locked by another process .