Change the Ready state to false
9818
protected void unsetReady()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "unsetReady", this);

        //set the ready state
        _ready = false;

        if (_keyGroup != null)
            _keyGroup.groupNotReady();

        // if consumerKey is null then it can't be already in ready state!
        if (_consumerKey != null)
        {
            //tell the consumerDispatcher that we are no longer ready
            _consumerKey.notReady();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "unsetReady");
    }
372067
function setInitialState(ret) {
    
    var e, r;
    
    // Before resetting, keep a copy of args
    if (ret) {
      e = (errored ? errors : null);
      r = results;
    }
    
    // Reset runtime vars to their default state
    counter = 0;
    errored = false;
    errors = [];
    results = [];
    
    // Flush stack on first run or when config.flush is true
    if (stack == null || config.flush) stack = [];
    
    // Return prepared arguments
    if (ret) return [e, r];

  }
1112659
private void changeStateTo(int newState) {
    synchronized (lockObject) {
      int oldState = this.status.getRunState();
      if (oldState == newState) {
        return; //old and new states are same
      }
      this.status.setRunState(newState);
    }
  }
596395
def target_sdp_state(self, state):
        """"""
        LOG.info('Setting SDP target state to %s', state)
        if self._sdp_state.current_state == state:
            LOG.info('Target state ignored, SDP is already "%s"!', state)
        if state == 'on':
            self.set_state(DevState.ON)
        if state == 'off':
            self.set_state(DevState.OFF)
        if state == 'standby':
            self.set_state(DevState.STANDBY)
        if state == 'disable':
            self.set_state(DevState.DISABLE)
        self._sdp_state.update_target_state(state)
680129
@Override
    public void onReloadRequired(Map<String, ServerState> states) {
        ReloadState reloadState = MODULES.getReloadState();
        reloadState.updateFrom(states);
        reloadState.propagateChanges();
    }
420510
public void toggleState()
    {
        if (m_iCurrentState == ON)
            m_iCurrentState = NULL;
        else if (m_iCurrentState == OFF)
            m_iCurrentState = ON;
        else
            m_iCurrentState = OFF;
        this.updateImage();
    }
337151
def set_state(self, newState, timer=0):
        """"""
        if _debug: ServerSSM._debug("set_state %r (%s) timer=%r", newState, SSM.transactionLabels[newState], timer)

        # do the regular state change
        SSM.set_state(self, newState, timer)

        # when completed or aborted, remove tracking
        if (newState == COMPLETED) or (newState == ABORTED):
            if _debug: ServerSSM._debug("    - remove from active transactions")
            self.ssmSAP.serverTransactions.remove(self)

            # release the device info
            if self.device_info:
                if _debug: ClientSSM._debug("    - release device information")
                self.ssmSAP.deviceInfoCache.release(self.device_info)
892517
def set_secondary_state(self, value):
        """"""
        if value not in (_STATE_RUNNING, _STATE_SHUTDOWN, _STATE_FORCED_SHUTDOWN):
            raise ValueError(
                "State {!r} is invalid - needs to be one of _STATE_RUNNING, _STATE_SHUTDOWN, or _STATE_FORCED_SHUTDOWN".format(
                    value)
                )
        if self.manager is None:
            raise RuntimeError("Manager not started")
        self.manager.set_state(value)
1125005
def ready(self):
        """"""
        if self.__timeout < time.time():
            self.cancel()
        return self.__queue.full() and not self.__queue.empty()
176227
async def _set_state(self, state: int) -> bool:
        """"""
        try:
            set_state_resp = await self.api._request(
                'put',
                DEVICE_SET_ENDPOINT,
                json={
                    'attributeName': 'desireddoorstate',
                    'myQDeviceId': self.device_id,
                    'AttributeValue': state,
                })
        except RequestError as err:
            _LOGGER.error('%s: Setting state failed (and halting): %s',
                          self.name, err)
            return False

        if set_state_resp is None:
            return False

        if int(set_state_resp.get('ReturnCode', 1)) != 0:
            _LOGGER.error(
                '%s: Error setting the device state: %s', self.name,
                set_state_resp.get('ErrorMessage', 'Unknown Error'))
            return False

        return True
1107948
function _readyStateChange(state) {
            this.readyState = state;

            if (typeof this.onreadystatechange == "function") {
                this.onreadystatechange();
            }

            this.dispatchEvent(new HttpRequestEvent("readystatechange"));

            if (this.readyState == IsotropyXMLHttpRequest.DONE) {
                this.dispatchEvent(new HttpRequestEvent("load", false, false, this));
                this.dispatchEvent(new HttpRequestEvent("loadend", false, false, this));
            }
        }
405800
private void setState(State state) {
    if (this.state != state) {
      this.state = state;
      LOGGER.debug("State changed: {}", state);
      changeListeners.forEach(l -> l.accept(state));
    }
  }
1247185
function setHeadsetState(newState){

    if (newState){

        appPlaying = true;
        appActive = true;

    }else{

        if (removeHeadsetPausesPlay)
            appPlaying = false;

    }


}
875466
def _change_state(name, action, expected, *args, **kwargs):
    '''
    
    '''
    pre = state(name)
    if action != 'restart' and pre == expected:
        return {'result': False,
                'state': {'old': expected, 'new': expected},
                'comment': ('Container \'{0}\' already {1}'
                            .format(name, expected))}
    _client_wrapper(action, name, *args, **kwargs)
    _clear_context()
    try:
        post = state(name)
    except CommandExecutionError:
        # Container doesn't exist anymore
        post = None
    ret = {'result': post == expected,
           'state': {'old': pre, 'new': post}}
    return ret
940826
def _set_master_state(self, state):
        """"""
        if state == 'init':
            self._service_state.update_current_state('init', force=True)
            self.set_state(DevState.INIT)

        elif state == 'on':
            self.set_state(DevState.ON)
            self._service_state.update_current_state('on')
938579
def switch_on(self):
        """"""
        success = self.set_status(CONST.STATUS_OPEN_INT)

        if success:
            self._json_state['status'] = CONST.STATUS_OPEN

        return success
1246650
private void doRunningStateChange(RunningState newState) {
    RunningState oldState = null;
    JobExecutionStateListener stateListener = null;
    this.changeLock.lock();
    try {
      // verify transition
      if (null == this.runningState) {
        Preconditions.checkState(RunningState.PENDING == newState);
      }
      else {
        Preconditions.checkState(EXPECTED_PRE_TRANSITION_STATES.get(newState).contains(this.runningState),
            "unexpected state transition " + this.runningState + " --> " + newState);
      }

      oldState = this.runningState;
      this.runningState = newState;
      if (this.listener.isPresent()) {
        stateListener = this.listener.get();
      }
      this.runningStateChanged.signalAll();
    }
    finally {
      this.changeLock.unlock();
    }
    if (null != stateListener) {
      stateListener.onStatusChange(this, oldState, newState);
    }
  }