public function obtainLock()
    {
        $tries       = 0;
        $waitClosure = $this->getWaitClosure();
        do {
            if ($this->doLock()->isLocked()) {
                return $this;
            }

            ++$tries;
            $waitClosure();
        } while ($tries < $this->lockTry);

        return $this;
    }