public function lock($lockName)
    {
        $lockHandle = $this->lockProvider->lock($lockName);

        if ($lockHandle === false) {
            return false;
        }

        $this->lockList[$lockName] = $lockHandle;
        return true;
    }
public function lock($lockName)
    {
        $lockHandle = $this->lockProvider->lock($lockName);

        if ($lockHandle === false) {
            return false;
        }

        $this->lockList[$lockName] = $lockHandle;
        return true;
    }
public function lock ( $ lockName ) { $ lockHandle = $ this -> lockProvider -> lock ( $ lockName ) ; if ( $ lockHandle === false ) { return false ; } $ this -> lockList [ $ lockName ] = $ lockHandle ; return true ; }
Attempts to acquire a single lock by name, and adds it to the lock set.

@param string $lockName The name of the lock to acquire
@return bool True if the lock was acquired, false otherwise
Attempts to acquire a single lock by name and adds it to the lock set .