Manage recognizer cancellation runnable.

@param action (int) (0 - stop, 1 - restart)
507292
private void updateStopRunnable(final int action) {
        if (stopRunnable != null) {
            if (action == 0) {
                handler.removeCallbacks(stopRunnable);
            } else if (action == 1) {
                handler.removeCallbacks(stopRunnable);
                handler.postDelayed(stopRunnable, STOP_DELAY);
            }
        }
    }
623598
private void cancelJoinTimer() {
    if (joinTimeout != null) {
      LOGGER.trace("{} - Cancelling join timeout", member().address());
      joinTimeout.cancel();
      joinTimeout = null;
    }
  }
1095093
@Override
  public void cancel(Serializable f) {
    if (f != null && f instanceof TimerTaskHandle) {
      TimerTaskHandle timerTaskHandle = (TimerTaskHandle) f;
      if (timerTaskHandle.future != null) {
        logger.debug("Cancelling timer with id [{}] and delay [{}]", timerTaskHandle.id, timerTaskHandle.future.getDelay(TimeUnit.MILLISECONDS));
        if (executor.remove((Runnable) timerTaskHandle.future)) {
          timerTaskHandle.future.cancel(false);
          returnTimerTaskHandle(timerTaskHandle);
        }
      }
    }
  }
965817
public void dismissConfirmation() {
        String action = "Clicking 'Cancel' on a confirmation";
        String expected = "Confirmation is present to be clicked";
        if (isNotConfirmation(action, expected)) {
            return;
        }
        dismiss(action, expected, "confirmation");
    }
553065
@Override
  public void cancel(Serializable id) {
    logger.debug("Cancelling timer with id {}", id);
    this.ftScheduler.cancel(id);
  }
1370564
public synchronized void cancel() // d583637
    {
        ivIsCanceled = true;
        stopAlarm();

        // F743-33394 - Wait for the sweep to finish.
        while (ivIsRunning) {
            try {
                wait();
            } catch (InterruptedException ex) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "interrupted", ex);
                Thread.currentThread().interrupt();
            }
        }

        ivActivator = null;
    }
1033526
private final void reduce(ParserAction action) throws ParserException {
	try {
	    Production production = getGrammar().getProduction(action.getParameter());
	    for (int i = 0; i < production.getConstructions().size(); i++) {
		/*
		 * The for loop is run as many times as the production contains constructions
		 * which are added up for an AST node.
		 */
		stateStack.pop();
	    }
	    actionStack.add(action);
	    ParserAction gotoAction = parserTable.getAction(stateStack.peek(), new NonTerminal(production.getName()));
	    if (gotoAction.getAction() == ActionType.ERROR) {
		error();
		return;
	    }
	    stateStack.push(gotoAction.getParameter());
	} catch (GrammarException e) {
	    logger.error(e.getMessage(), e);
	    throw new ParserException(e.getMessage());
	}
    }
995908
@Trivial
    private void performAction(Runnable action, boolean addToQueue) {
        ExecutorService exec = executorService.getService();

        if (exec == null) {
            // If we can't find the executor service, we have to run it in place.
            action.run();
        } else {
            // If we can find the executor service, we'll add the action to the queue.
            // If the actionFuture is null (no pending actions) and the configFuture is null (no
            // pending configuration updates), we'll submit the actionsRunner to the executor
            // service to drain the queue
            //
            // configFuture is used to avoid bouncing the endpoint multiple times because of a
            // single configuration update.
            //
            // actionFuture is only set to a non-null value by kicking off the executor service here.
            // actionsRunner syncs on actionQueue, so we can't add any new actions while we are
            // draining the queue. When the queue is empty, actionFuture is explicitly set to null.
            //
            // Long story short, it prevents us from kicking off multiple executors which could run in
            // random order.
            if (addToQueue) {
                synchronized (actionQueue) {
                    actionQueue.add(action);
                    if ((actionFuture == null) && (configFuture == null)) {
                        actionFuture = exec.submit(actionsRunner);
                    }
                }
            } else {
                // Schedule immediately
                exec.submit(action);
            }
        }
    }
243862
public void hide (Action action) {
		Stage stage = getStage();
		if (stage != null) {
			removeListener(focusListener);
			if (previousKeyboardFocus != null && previousKeyboardFocus.getStage() == null) previousKeyboardFocus = null;
			Actor actor = stage.getKeyboardFocus();
			if (actor == null || actor.isDescendantOf(this)) stage.setKeyboardFocus(previousKeyboardFocus);

			if (previousScrollFocus != null && previousScrollFocus.getStage() == null) previousScrollFocus = null;
			actor = stage.getScrollFocus();
			if (actor == null || actor.isDescendantOf(this)) stage.setScrollFocus(previousScrollFocus);
		}
		if (action != null) {
			addCaptureListener(ignoreTouchDown);
			addAction(sequence(action, Actions.removeListener(ignoreTouchDown, true), Actions.removeActor()));
		} else
			remove();
	}
1236530
@Override
	public CompletableFuture<Acknowledge> cancel(Time timeout) {
		executionGraph.cancel();

		return CompletableFuture.completedFuture(Acknowledge.get());
	}
378772
def skip_action(self, action):
        
        if 'skip' not in self.flags:
            self.flags['skip'] = []
        self.flags['skip'].append(action)
627263
public void cancel() {
        mActivePointerId = INVALID_POINTER;
        clearMotionHistory();

        if (mVelocityTracker != null) {
            mVelocityTracker.recycle();
            mVelocityTracker = null;
        }
    }
425588
public void notifyProcessListener(Token token, Action action) {
		if (processListener != null) {
			processListener.log(this, token, action);
		}
	}
1195487
public void setCancelAction(Action.OnActionListener listener) {
        setCancelAction(listener, null, null, null, null);
    }
542939
protected void cancelAlarms() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "cancelAlarms");

        if (_timeout > 0) {
            TimeoutManager.setTimeout(this, TimeoutManager.CANCEL_TIMEOUT, 0);
            _timeout = 0;
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "cancelAlarms");
    }
455513
public void cancelTriggerInstance(final TriggerInstance triggerInst,
      final CancellationCause cause) {
    if (triggerInst.getStatus() == Status.RUNNING) {
      this.flowTriggerExecutorService.submit(() -> cancel(triggerInst, cause));
    }
  }
1344799
public void setAction(String action) throws ApplicationException {
	if (StringUtil.isEmpty(action)) return;
	action = action.toLowerCase().trim();
	if (action.equals("run")) this.action = ACTION_RUN;
	else if (action.equals("delete")) this.action = ACTION_DELETE;
	else if (action.equals("update")) this.action = ACTION_UPDATE;
	else if (action.equals("list")) this.action = ACTION_LIST;
	else if (action.equals("lists")) this.action = ACTION_LIST;
	else if (action.equals("pause")) this.action = ACTION_PAUSE;
	else if (action.equals("resume")) this.action = ACTION_RESUME;
	else throw new ApplicationException("attribute action with value [" + action + "] of tag schedule is invalid",
		"valid attributes are [delete,run,update,list,resume,pause]");
    }