Release a lock that was not auto released by the lock method.

 @return [void]
544687
def release
      @refresh_mutex.synchronize {
        @unlock = true

        delete

        @refresh_signal.signal
      }


      @refresh_thread.join if @refresh_thread
      @event_manager.create_event(
        {
          user: Config.current_job.username,
          action: 'release',
          object_type: 'lock',
          object_name: @name,
          task: @task_id,
          deployment: @deployment_name,
        }
      )
    end
693000
def _release_lock(self):
        """"""
        if not self._has_lock():
            return

        # if someone removed our file beforhand, lets just flag this issue
        # instead of failing, to make it more usable.
        lfp = self._lock_file_path()
        try:
            rmfile(lfp)
        except OSError:
            pass
        self._owns_lock = False
994743
function release() {
    if (this.isTrapped) {
        this.restoreTrap = this.state.open;
        screenReaderTrap.untrap(this.windowEl);
        keyboardTrap.untrap(this.windowEl);
    } else {
        this.restoreTrap = false;
    }
}
238515
def release(self, key: str) -> Optional[str]:
        
        ConsulLockManager.validate_key(key)

        key_value = self.consul_client.kv.get(key)[1]
        if key_value is None:
            logger.info(f"No lock found")
            return None

        lock_information = json.loads(key_value["Value"].decode("utf-8"), cls=ConsulLockInformationJSONDecoder)
        logger.info(f"Destroying the session {lock_information.session_id} that is holding the lock")
        unlocked = self.consul_client.session.destroy(session_id=lock_information.session_id)
        # This instance might be managing the removed session
        try:
            self._acquiring_session_ids.remove(lock_information.session_id)
        except KeyError:
            pass

        logger.info("Unlocked" if unlocked else "Went to unlock but was already released upon sending request")
        return key
409913
def do_lock
      clean
      if(@lock_owner)
        if(owner?(Thread.current))
          @locks.unshift(Thread.current)
        else
          @locks << Thread.current
        end
      else
        @lock_owner = Thread.current
      end
      true
    end
1304553
def release(self):
        
        
        if self.is_locked_by_me():
            os.remove(self.lock_filename)
            logger.debug('The lock {} is released by me (pid: {}).'.format(self.lock_filename, self.pid))
        if self.fd:
            os.close(self.fd)
            self.fd = None
1064329
def release(self):
        
        try:
            if self._rotateFailed:
                self._close()
        except Exception:
            self.handleError(NullLogRecord())
        finally:
            try:
                if self.stream_lock and not self.stream_lock.closed:
                    unlock(self.stream_lock)
            except Exception:
                self.handleError(NullLogRecord())
            finally:
                # release thread lock
                if Handler:
                    Handler.release(self)
595077
async def release(self):
        ""
        expected_token = self.local.token
        if expected_token is None:
            raise LockError("Cannot release an unlocked lock")
        self.local.token = None
        await self.do_release(expected_token)
519832
function lock()
    {
        if ( $fp = $this->fp() )
        {
            if ( flock( $fp, LOCK_EX ) )
            {
                $this->clearMeta();
                $this->setMeta( 'timestamp', time() );
                return true;
            }
        }
        return false;
    }
820073
public function auto_release() {
        // Called from the shutdown handler. Must release all open locks.
        foreach ($this->openlocks as $key => $unused) {
            $lock = new lock($key, $this);
            $lock->release();
        }
    }
886568
public function release()
    {
        if ($this->handle) {
            flock($this->handle, LOCK_UN | LOCK_NB);
            fclose($this->handle);
            $this->handle = null;
        }
    }
187323
function maybeReleaseLock() {
    var lock = self.client.lock;

    function done(err) {
      log.debug({client: self.client}, 'Closed client sync handler');
      self.client.lock = null;
      self.client = null;
      callback(err);
    }

    // No lock
    if(!lock) {
      return done();
    }
    // Lock reference, but it's already unlocked
    if(lock.unlocked) {
      return done();
    }
    // Holding lock, release it
    lock.release(function(err) {
      if(err) {
        log.error({err: err, client: self.client}, 'Error releasing sync lock');
        return done(err);
      }
      done();
    });
  }
1294289
public function release(): bool
    {
        if (!is_resource($this->lock)) {
            return true;
        }

        return flock($this->lock, LOCK_UN);
    }
114144
def lock(timeout = nil, &block)
      Scripts.call(:lock, redis_pool,
                   keys: [exists_key, grabbed_key, available_key, UNIQUE_SET, unique_digest],
                   argv: [jid, ttl, lock_type])

      grab_token(timeout) do |token|
        touch_grabbed_token(token)
        return_token_or_block_value(token, &block)
      end
    end
989328
public static function release()
	{
		if ( is_null( self::$authFileP ) ) return;
		$a = @flock( self::$authFileP , LOCK_UN );
		@fclose( self::$authFileP );
		self::$authFileP       = null;
		self::$currentlylocked = false;
	}
900869
def locked_action(lock_name, raise_on_locked = false)
      begin
        self[lock_name].lock do
          yield
        end
      rescue => e
        if e.class.to_s.end_with?("Timeout")
          raise if raise_on_locked
        else
          raise
        end
      end
    end
495321
def close(self):
        
        super(LockingDatabase, self).close()
        if not self.readonly:
            self.release_lock()