Retrieves busy state of the current object.
965551
@Ensures({
    "contextLocal >= 0",
    "checkInvariantsLocal >= 0"
  })
  protected void enterContractedMethod() {
    contextLocal = newLocal(CONTRACT_CONTEXT_TYPE);
    checkInvariantsLocal = newLocal(Type.BOOLEAN_TYPE);
    invokeStatic(CONTRACT_RUNTIME_TYPE, GET_CONTEXT_METHOD);
    dup();
    storeLocal(contextLocal);
    if (statik) {
      loadThisClass();
    } else {
      loadThis();
    }
    invokeVirtual(CONTRACT_CONTEXT_TYPE, TRY_ENTER_METHOD);
    storeLocal(checkInvariantsLocal);
  }
159504
public function getReadyForBed()
    {
        $busyStatusses = array(ChildProcessContainer::STATUS_SLEEPY,
            ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY
        );
        if (in_array($this->status, $busyStatusses)) {
            //ready for bed
            return;
        }
        if($this->status  == ChildProcessContainer::STATUS_DEAD)
        {
            // do nothing
        }
        else if ($this->status == ChildProcessContainer::STATUS_BUSY) {
            $this->status = ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY;
        } else {
            $this->status = ChildProcessContainer::STATUS_SLEEPY;
        }
        if ($this->process->isRunning()) {
            $this->sendTERMSignal();
        }
    }
764834
@Override
	public synchronized T get() {
		@Nullable T checkedObject = this.object;

		if (checkedObject == null) {
			throw new IllegalStateException("Not initialized");
		}
		return checkedObject;
	}
13326
def get_current_async():
    
    local_context = _local.get_local_context()

    if local_context._executing_async:
        return local_context._executing_async[-1]

    raise errors.NotInContextError('Not in an _ExecutionContext.')
1357962
public synchronized Object get() {
        Object o = null;

        while ((o = tryGet()) == null) {
            try {
                this.wait();
            } catch (final InterruptedException e) {
            }
        }
        return o;
    }
1285115
def _get_async_status(self, response):
        
        if self._is_empty(response):
            return None
        body = response.json()
        return body.get('status')
52056
def get_state(self, state):
        """"""
        # Check to see if we have a change request pending; if we do
        # return the value we expect it to change to.
        for data in list(self._send_queue.queue):
            desired_states = data['desired_states']
            for desired_state in desired_states:
                if desired_state['state'] == state:
                    return desired_state['enabled']
        if state == States.FILTER_LOW_SPEED:
            return (States.FILTER.value & self._flashing_states) != 0
        return (state.value & self._states) != 0
801761
def get(self):
        ''''''
        now = time.time()
        if self.bucket >= self.burst:
            self.last_update = now
            return self.bucket
        bucket = self.rate * (now - self.last_update)
        self.mutex.acquire()
        if bucket > 1:
            self.bucket += bucket
            if self.bucket > self.burst:
                self.bucket = self.burst
            self.last_update = now
        self.mutex.release()
        return self.bucket
800783
def busy?
      busy = false
      @mutex.synchronize { busy = @thread_name_to_queue.any? { |_, q| q.busy? } }
      busy
    end
345337
synchronized Object getValue() {
        while (value == NULL) {
            try {
                wait();
            } catch (InterruptedException ex) {
                throw new RuntimeException(ex);
            }
        }
        return value;
    }
634193
public STATUS getStatus() {
		if (featureContent.isLoaded()) {
			return STATUS.LOADED;
		}
		if (deferred == null) {
			return STATUS.EMPTY;
		}
		return STATUS.LOADING;
	}
718452
def status(self) -> str:
        """"""
        # As status is a modifiable property, have to reload from the db.
        self._config = self._load_config()
        return self._config.get('status')
74425
public LifecycleState getState(Object obj)
    {
        LifecycleStateWrapper lifecycleState = objectStates.get(obj);
        if ( lifecycleState == null )
        {
            return hasStarted() ? LifecycleState.ACTIVE : LifecycleState.LATENT;
        }
        else {
            synchronized(lifecycleState) {
                return lifecycleState.get();
            }
        }
    }
402827
private Object waitingGet(boolean interruptible) {
        Signaller q = null;
        boolean queued = false;
        int spins = SPINS;
        Object r;
        while ((r = result) == null) {
            if (spins > 0) {
                if (ThreadLocalRandom.nextSecondarySeed() >= 0)
                    --spins;
            }
            else if (q == null)
                q = new Signaller(interruptible, 0L, 0L);
            else if (!queued)
                queued = tryPushStack(q);
            else {
                try {
                    ForkJoinPool.managedBlock(q);
                } catch (InterruptedException ie) { // currently cannot happen
                    q.interrupted = true;
                }
                if (q.interrupted && interruptible)
                    break;
            }
        }
        if (q != null) {
            q.thread = null;
            if (q.interrupted) {
                if (interruptible)
                    cleanStack();
                else
                    Thread.currentThread().interrupt();
            }
        }
        if (r != null)
            postComplete();
        return r;
    }
158234
public JobStatus.State reload() throws InterruptedException {
    // [START ]
    while (!JobStatus.State.DONE.equals(job.getStatus().getState())) {
      Thread.sleep(1000L);
      job = job.reload();
    }
    // [END ]
    return job.getStatus().getState();
  }
1002050
def get_active_state(self) -> Optional[str]:
        """"""
        for state in self.get_run_states():
            if state.active:
                return state.name
        return None
990292
def state(self):
        
        if self.is_active:
            if 'NowPlayingItem' in self.session:
                if self.session['PlayState']['IsPaused']:
                    return STATE_PAUSED
                else:
                    return STATE_PLAYING
            else:
                return STATE_IDLE
        else:
            return STATE_OFF