Detaches the current executor from this command and sets the command to disabled state.
770822
public void detachCommandExecutor() {
        if (this.commandExecutor instanceof GuardedActionCommandExecutor) {
            unsubscribeFromGuardedCommandDelegate();
        }
        this.commandExecutor = null;
        setEnabled(false);
        logger.debug("Command delegate detached.");
    }
45768
public void cancel() {

    this.stateLock.lock();

    try {

      if (this.state == RunnableProcessState.RUNNING) {
        this.process.destroy();
        if (!this.doneCond.await(DESTROY_WAIT_TIME, TimeUnit.MILLISECONDS)) {
          LOG.log(Level.FINE, "{0} milliseconds elapsed", DESTROY_WAIT_TIME);
        }
      }

      if (this.state == RunnableProcessState.RUNNING) {
        LOG.log(Level.WARNING, "The child process survived Process.destroy()");
        if (OSUtils.isUnix() || OSUtils.isWindows()) {
          LOG.log(Level.WARNING, "Attempting to kill the process via the kill command line");
          try {
            final long pid = readPID();
            OSUtils.kill(pid);
          } catch (final IOException | InterruptedException | NumberFormatException e) {
            LOG.log(Level.SEVERE, "Unable to kill the process.", e);
          }
        }
      }

    } catch (final InterruptedException ex) {
      LOG.log(Level.SEVERE,
          "Interrupted while waiting for the process \"{0}\" to complete. Exception: {1}",
          new Object[] {this.id, ex});
    } finally {
      this.stateLock.unlock();
    }
  }
675726
def shutdown(self):
        """"""
        self._done.set()
        self.executor.shutdown(wait=False)
24784
public void stop() {

    reflector.stop();
    reflectorFuture.cancel(true);
    reflectExecutor.shutdown();

    if (resyncFuture != null) {
      resyncFuture.cancel(true);
      resyncExecutor.shutdown();
    }
  }
665405
public function purgeCurrent()
    {
        if (!$this->valid()) {
            return;
        }

        if ($this->current()->hasUid()) {
            $uid = $this->current()->getUid();
            if (isset($this->uids[$uid])) {
                unset($this->uids[$uid]);
            }
        }

        $this->detach($this->current());

        $this->markAsDirty();
    }
786929
void tearDown() throws InterruptedException {
    if (cancelFuture != null) {
      cancelFuture.cancel(false);
    }
    executor.shutdown();
    executor.awaitTermination(10, TimeUnit.SECONDS);
  }
1134886
public void stop() throws Throwable
   {
      shutdown.set(true);

      if (!isExternal && executorService != null)
      {
         executorService.shutdownNow();
         executorService = null;
      }

      registeredPools.clear();
   }
1225044
public void cancel() {
        if(actionInBackground != null) {
            if(executorService != null) {
               asyncFutureTask.cancel(true);
            } else {
                asyncThread.interrupt();
            }
        }
    }
1212076
void detach() {
        mLock.lock();
        try {
            if (mDetached || mTxnMgr.removeLocalScope(this)) {
                mDetached = true;
            } else {
                throw new IllegalStateException("Transaction is attached to a different thread");
            }
        } finally {
            mLock.unlock();
        }
    }
185204
public void interrupt() {
        Queue.withLock(new Runnable() {
            @Override
            public void run() {
                for (Executor e : executors) {
                    e.interruptForShutdown();
                }
            }
        });
    }
795679
def do_detach(self, arg):
        
        debug   = self.debug
        token_list = self.split_tokens(arg)
        if self.cmdprefix:
            token_list.insert(0, self.cmdprefix)
        targets = self.input_process_list(token_list)
        if not targets:
            if self.lastEvent is None:
                raise CmdError("no current process set")
            targets = [ self.lastEvent.get_pid() ]
        for pid in targets:
            try:
                debug.detach(pid)
                print("Detached from process (%d)" % pid)
            except Exception:
                print("Error: can't detach from process (%d)" % pid)
929693
@Override
    public void deactivate() throws InterruptedException, CouldNotPerformException {
        synchronized (maintainerLock) {
            try {
                verifyMaintainability();
                validateInitialization();
            } catch (InvalidStateException ex) {
                // was never initialized!
                return;
            }
            if (connectionState != RECONNECTING) {
                skipSyncTasks();
                setConnectionState(DISCONNECTED);
                if (pingTask != null && !pingTask.isDone()) {
                    pingTask.cancel(true);
                }
            }
            if (listenerWatchDog != null) {
                listenerWatchDog.deactivate();
            }

            if (remoteServerWatchDog != null) {
                remoteServerWatchDog.deactivate();
            }
        }
        synchronized (connectionMonitor) {
            connectionMonitor.notifyAll();
        }
    }
872909
void deactivate() {

        final String methodName = "deactivate";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        _active = false;

        /*
         * Deregister the messaging engine listener
         */

        SibRaEngineComponent.deregisterMessagingEngineListener(this,
                _endpointConfiguration.getBusName());

        /*
         * Close all of the connections
         */

        synchronized (_connections) {

            for (final Iterator iterator = _connections.values().iterator(); iterator
                    .hasNext();) {

                final SibRaMessagingEngineConnection connection = (SibRaMessagingEngineConnection) iterator
                        .next();
                connection.close();

            }

            _connections.clear();

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName);
        }

    }
1304575
public void abort(final Executor exec) throws SQLException {
        if (exec == null) {
            throw new SQLException("Missing executor");
        } // end of if

        if (this.closed) {
            return;
        } // end of if

        this.closed = true;
    }
28247
def deactivate(self):
        
        self.open()
        d = lvm_lv_deactivate(self.handle)
        self.close()
        if d != 0:
            raise CommitError("Failed to deactivate LV.")
341041
protected void resetExecutor() throws RepositoryException {
        if (mExecutor != null) {
            mExecutor = executorFactory().executor(mFilter, mOrdering, null);
        }
    }
876761
public void stop() {
        if (future != null) {
            future.cancel(true);
        }
        if (executor != null) {
            executor.shutdownNow();
        }
    }