### Running state
326964
function Running(worker) {
    this.worker = worker;
    this.startedAt = Date.now();
    this.unhealthyTimeoutHandle = null;

    this.handleUnhealthyTimeout = this.handleUnhealthyTimeout.bind(this);

    // Start the health check interval if configured
    if (worker.spec.pulse && worker.spec.unhealthyTimeout) {
        this.scheduleUnhealthyTimeout();
    }
}
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);
    }
  }
911655
function(state) {
            if (state == this.state) return;

            this.state = state;
            logging.log("state ", this.state);
            this.trigger("state", this.state);
        }
788235
function(state)
  {
    console.log('# Started batch process\n');
    console.log('## Initial State:\n');
    console.log('```');
    console.log(JSON.stringify(sortKeys(state), null, 2));
    console.log('```');
    console.log('\n## Execution\n');
  }
399857
function state(list, sortMethod)
{
  var isNamedList = !Array.isArray(list)
    , initState =
    {
      index    : 0,
      keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
      jobs     : {},
      results  : isNamedList ? {} : [],
      size     : isNamedList ? Object.keys(list).length : list.length
    }
    ;

  if (sortMethod)
  {
    // sort array keys based on it's values
    // sort object's keys just on own merit
    initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
    {
      return sortMethod(list[a], list[b]);
    });
  }

  return initState;
}
105308
def is_running(self):
        
        return self._process.state() in [self._process.Running, self._process.Starting]
606535
function collect_states_recursive( array &$states, Grammar $Grammar, array $excluded, $threadId ){
		// recursion check
		if( $this->threadId === $threadId ){
			//echo "Recursion in $this \n";
			return;
		}
		$this->threadId = $threadId;
		// add denied first terminals into array
		$excluded = array_merge( $excluded, $Grammar->excluded_terminals($this->nt) );
		// Follow e-transitions recursively to gather all possible states
		foreach( $this->etransitions as $s => $State ){
			$State->collect_states_passthru( $states, $Grammar, $excluded, $threadId );
		}
	}
1063218
private boolean isTaskRunning(TaskStatus taskStatus) {
    TaskStatus.State state = taskStatus.getRunState();
    return (state == State.RUNNING || state == State.UNASSIGNED || 
            taskStatus.inTaskCleanupPhase());
  }
840839
function (state) {
          // Keep locals around.
          inactiveStates[state.self.name] = state;
          // Notify states they are being Inactivated (i.e., a different
          // sticky state tree is now active).
          state.self.status = 'inactive';
          if (state.self.onInactivate)
            $injector.invoke(state.self.onInactivate, state.self, state.locals.globals);
        }
786928
public State<S, A> withState(Fn1<? super S, ? extends S> fn) {
        return state(s -> run(fn.apply(s)));
    }
1080879
protected function inMainCommentState()
    {
        $char = $this->getCurrentChar();

        if ($char === self::CHAR_SLASH && $this->getPreviousChar() === self::CHAR_STAR) {
            $this->setState(self::RUNNING);
        }

        $this->output($char);
    }
55140
def is_running(config, container, *args, **kwargs):
    '''
    
    '''
    try:
        infos = _get_container_infos(config, container)
        return (infos if infos.get('State', {}).get('Running') else None)
    except Exception:
        return None
649861
@Override
    public boolean isRunning() {
        for (Node node : mNodes) {
            if (node.animation.isRunning()) {
                return true;
            }
        }
        return false;
    }
464867
public function isSuccessful()
    {
        if ($this->getState() === static::STATE_NOT_RUNNING) {
            foreach ($this->items as $run) {
                if (!$run->isSuccessful()) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
795956
function(value) {
			var running = this.running;
			
			this.countdown = value ? true : false;
				
			if(running) {
				this.stop();
				this.start();
			}
		}
476891
function()
	{
		if ( this.state == CKEDITOR.TRISTATE_OFF )
			this.setState( CKEDITOR.TRISTATE_ON );
		else if ( this.state == CKEDITOR.TRISTATE_ON )
			this.setState( CKEDITOR.TRISTATE_OFF );
	}
108921
public boolean isRunning()
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "isRunning");
      SibTr.exit(tc, "isRunning", new Boolean(_isRunning));
    }
    
    return _isRunning;
  }