Unlock the active advisory lock.
6236
def unlock(self):
        
        logger.debug("Releasing lock %s", self.lock_file)
        self._lock.release()
        try:
            os.unlink(self.lock_file)
        except FileNotFoundError:
            pass
1249513
def _unlock(self):
        """"""
        if self.locked:
            try:
                self.device.cu.unlock()
                self.locked = False
            except JnrpUnlockError as jue:
                raise UnlockError(jue.messsage)
1179769
public function setActive() {
		if (! $this->_active) {
			$this->addClass(self::CLASS_ACTIVE);
			$this->_active = true;
		}
		
		return $this;
	}
1277381
function isActive() {
    try {
      var key = '___session is active___';
      return session.get(key) || session.set(key, true);
    } catch (err) {
      return false;
    }
  }
1349712
def unlock(self, source_node, check_status=True):
        
        if self.status != self.S_LOCKED:
            raise RuntimeError("Trying to unlock a task with status %s" % self.status)

        self._status = self.S_READY
        if check_status: self.check_status()
        self.history.info("Unlocked by %s", source_node)
155589
def updateState(self):
        
        if self.isChecked():
            self.setIcon(self.lockIcon())
            self.setToolTip('Click to unlock')
        else:
            self.setIcon(self.unlockIcon())
            self.setToolTip('Click to lock')
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)
1098699
def locked(self, lock):
        """"""
        _LOGGER.debug("Setting the lock: %s", lock)
        value = struct.pack('BB', PROP_LOCK, bool(lock))
        self._conn.make_request(PROP_WRITE_HANDLE, value)
437310
private static function lock()
	{
		if (self::$currentlylocked === false) {
			self::$authFileP = fopen( self::$authFile , "a+" );
			if ( flock( self::$authFileP , LOCK_EX ) ) {
				self::$currentlylocked = true;
			} else {
				throw new Exception( 'Unable to lock file' );
			}
		}

		return true;
	}
741593
def ok(self, *args, cb=None):
        """"""
        self.clear_widgets()
        if cb:
            cb()
        self.idx += 1
        self.advance_dialog()
885511
def toggle(self):
        
        with self._lock:
            if self.is_active:
                self.off()
            else:
                self.on()
757343
def _unlock(self):
        """"""
        if self.locked:
            self.device.cu.unlock()
            self.locked = False
1048027
def release(self):
        ""
        if self.acquired_until is None:
            raise ValueError("Cannot release an unlocked lock")
        existing = float(self.redis.get(self.name) or 1)
        # if the lock time is in the future, delete the lock
        if existing >= self.acquired_until:
            self.redis.delete(self.name)
        self.acquired_until = None
247599
function() {
        if(this.strategies) {
            var strategy, i, len;
            for(i=0, len=this.strategies.length; i<len; i++) {
                strategy = this.strategies[i];
                if(strategy.autoActivate) {
                    strategy.activate();
                }
            }
        }
    }
37669
def unlock(self, password, auth_no_user_interaction=None):
        """"""
        return self._M.Encrypted.Unlock(
            '(sa{sv})',
            password,
            filter_opt({
                'auth.no_user_interaction': ('b', auth_no_user_interaction),
            })
        )
1364986
def lock(self):
        """"""
        if not self.__lock_state:
            data = self._controller.command(self._id, 'charge_port_door_close',
                                            wake_if_asleep=True)
            if data['response']['result']:
                self.__lock_state = True
            self.__manual_update_time = time.time()
268318
public void
restoreActive(int pos) {
	if (pos > byteBuffer.capacity()) {
		throw new IllegalArgumentException("cannot set active " +
						   "region past end of input");
	}
	byteBuffer.limit(byteBuffer.position());
}