NinjaMutex\Tests\Mock\MockLock::acquireLock PHP Method

acquireLock() public method

public acquireLock ( string $name, null | integer $timeout = null ) : boolean
$name string
$timeout null | integer
return boolean
    public function acquireLock($name, $timeout = null)
    {
        if (!$this->available) {
            return false;
        }
        $this->counter++;
        return true;
    }