public function release()
    {
        if (!$this->handler) {
            throw new \LogicException('Lock is not acquired');
        }
        if (!@ftruncate($this->handler, 0)) {
            $this->throwLastErrorException();
        }
        if (!flock($this->handler, LOCK_UN)) {
            throw new \RuntimeException(sprintf('Unable to release lock on %s', $this->file));
        }
        $this->closeFile();
    }