End the application.
433515
private void endApplication(@Nullable Thread uncaughtExceptionThread, Throwable th) {
        final boolean letDefaultHandlerEndApplication = config.alsoReportToAndroidFramework();

        final boolean handlingUncaughtException = uncaughtExceptionThread != null;
        if (handlingUncaughtException && letDefaultHandlerEndApplication && defaultExceptionHandler != null) {
            // Let the system default handler do it's job and display the force close dialog.
            if (ACRA.DEV_LOGGING) ACRA.log.d(LOG_TAG, "Handing Exception on to default ExceptionHandler");
            defaultExceptionHandler.uncaughtException(uncaughtExceptionThread, th);
        } else {
            processFinisher.endApplication();
        }
    }
47399
def end(self):
        """"""
        TftpContext.end(self, not self.filelike_fileobj)
        self.metrics.end_time = time.time()
        log.debug("Set metrics.end_time to %s" % self.metrics.end_time)
        self.metrics.compute()
374197
public void close() throws IOException {
    // if we haven't started the application, we have nothing to do
    if (isOk) {
      OutputCollector<K3, V3> nullCollector = new OutputCollector<K3, V3>() {
        public void collect(K3 key, 
                            V3 value) throws IOException {
          // NULL
        }
      };
      startApplication(nullCollector, Reporter.NULL);
    }
    try {
      if (isOk) {
        application.getDownlink().endOfInput();
      } else {
        // send the abort to the application and let it clean up
        application.getDownlink().abort();
      }
      LOG.info("waiting for finish");
      application.waitForFinish();
      LOG.info("got done");
    } catch (Throwable t) {
      application.abort(t);
    } finally {
      application.cleanup();
    }
  }
1008116
def terminate(self):
        """"""
        if self._process.state() == QProcess.Running:
            try:
                self._process.terminate()
            except Exception:
                pass
        self._fired = True
1228640
async def end(self):
        """"""
        try:
            await self.proc.wait()
        finally:
            # Cleanup temporary files.
            for temporary_file in self.temporary_files:
                temporary_file.close()
            self.temporary_files = []

        return self.proc.returncode
891830
public static final synchronized void terminate()
    {
        if (started)
        {
            engine.close();
            started = false;
            Verbose.info(ENGINE_TERMINATED);
            engine.postClose();
            engine = null;
        }
    }
567079
public function end()
    {
        $this->sendHeaders();
        $this->httpResponse->write($this->data);
        $this->httpResponse->end();
    }
1284608
def terminate(self):
    """"""
    # Tear down the Pailgun TCPServer.
    if self.pailgun:
      self.pailgun.server_close()

    super(PailgunService, self).terminate()
54824
def terminate(self):
        """"""
        for t in self._threads:
            t.quit()
        self._thread = []
        self._workers = []
727539
def close(self, reason):
        """"""
        self._closing = True
        self.do_close(reason)
        self._closing = False
541033
def Stop(self):
    """"""
    self._Close()

    if self._rpc_thread.isAlive():
      self._rpc_thread.join()
    self._rpc_thread = None
992130
public void end() {
        if (this.sectionName != null) {
            Log.d(TAG, "" + this.sectionName + " loaded in " + (ActorTime.currentTime() - sectionStart) + " ms");
            this.sectionName = null;
        }
    }
549164
def exit(self):
        """"""
        # To ensure all connections are properly closed
        self.client.flush()
        self.client.close()
        # Call the father method
        super(Export, self).exit()
838085
def close(self):
        
        if hasattr(self, "_browser"):
            self.loop.run_until_complete(self._browser.close())
        super().close()
343893
public synchronized void stop() throws IOException, TimeoutException {
    if (this.stopped) {
      return;
    }

    LOGGER.info("Stopping the " + GobblinYarnAppLauncher.class.getSimpleName());

    try {
      if (this.applicationId.isPresent() && !this.applicationCompleted) {
        // Only send the shutdown message if the application has been successfully submitted and is still running
        sendShutdownRequest();
      }

      if (this.serviceManager.isPresent()) {
        this.serviceManager.get().stopAsync().awaitStopped(5, TimeUnit.MINUTES);
      }

      ExecutorsUtils.shutdownExecutorService(this.applicationStatusMonitor, Optional.of(LOGGER), 5, TimeUnit.MINUTES);

      stopYarnClient();

      disconnectHelixManager();
    } finally {
      try {
        if (this.applicationId.isPresent()) {
          cleanUpAppWorkDirectory(this.applicationId.get());
        }
      } finally {
        this.closer.close();
      }
    }

    this.stopped = true;
  }
607620
def quit(self):
    """"""
    try:
      # Don't expect a response.
      self._client.write(sc_pb.Request(quit=sc_pb.RequestQuit()))
    except protocol.ConnectionError:
      pass  # It's likely already (shutting) down, so continue as if it worked.
    finally:
      self.close()
914563
public function stop()
    {
        if ($this->isStarted()) {
            // trigger bbapplication.stop
            $this->getEventDispatcher()->dispatch('bbapplication.stop', new Event($this));
            $this->info('BackBee application ended');
        }
    }