Called by the place manager when it has been shut down.
964173
protected void unmapPlaceManager (PlaceManager pmgr)
    {
        int ploid = pmgr.getPlaceObject().getOid();
        // remove it from the table
        if (_pmgrs.remove(ploid) == null) {
            log.warning("Requested to unmap unmapped place manager", "pmgr", pmgr);

//         } else {
//             Log.info("Unmapped place manager [class=" + pmgr.getClass().getName() +
//                      ", ploid=" + ploid + "].");
        }
    }
984868
def shutdown(self):
        ''
        log.info("shutting down")

        for peer in self._dispatcher.peers.values():
            peer.go_down(reconnect=False)

        if self._listener_coro:
            backend.schedule_exception(
                    errors._BailOutOfListener(), self._listener_coro)
        if self._udp_listener_coro:
            backend.schedule_exception(
                    errors._BailOutOfListener(), self._udp_listener_coro)
1222790
def gracefulShutdown(self):
        """"""
        if not self.bf.perspective:
            log.msg("No active connection, shutting down NOW")
            reactor.stop()
            return

        log.msg(
            "Telling the master we want to shutdown after any running builds are finished")
        d = self.bf.perspective.callRemote("shutdown")

        def _shutdownfailed(err):
            if err.check(AttributeError):
                log.msg(
                    "Master does not support worker initiated shutdown.  Upgrade master to 0.8.3 or later to use this feature.")
            else:
                log.msg('callRemote("shutdown") failed')
                log.err(err)

        d.addErrback(_shutdownfailed)
        return d
1285668
def stop_gracefully(self):
        '''

        '''
        if self.shutting_down:
            self.log(logging.INFO,
                     'second shutdown request, shutting down now')
            self.scram()
        else:
            self.log(logging.INFO, 'shutting down after current jobs finish')
            self.shutting_down = True
159308
synchronized void close() {
    if (this.remoteManager.isPresent()) {
      try {
        this.remoteManager.get().close();
      } catch (final Exception e) {
        LOG.log(Level.WARNING, "Exception while shutting down the RemoteManager.", e);
      }
    }
  }
1154156
public function handleShutdown()
    {
        if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) {
            $this->handleException($this->fatalExceptionFromError($error, 0));
        }
        $this->getExceptionHandler()->shutdown();
    }
1326166
def shutdown(self, exitcode=0, exitmsg=None):
        '''
        
        '''
        self.action_log_info('Shutting down')
        super(Syndic, self).shutdown(
            exitcode, ('The Salt {0} is shutdown. {1}'.format(
                self.__class__.__name__, (exitmsg or '')).strip()))
1123000
def shutdown(self):
        
        self.stop = True
        if self.stats:
            self.stats.shutDownStats()
        self.join()
735248
def shutdown_now(self):
        

        self.log.info("Forced shutdown...")
        self.status = "killing"

        self.gevent_pool.kill(exception=JobInterrupt, block=False)

        raise StopRequested()
219802
private void shutdown(){
    parent.workerThreads.get(plan).remove(this);
    if (zk != null) {
      try {
        logger.debug("closing " + zk.getSessionId());
        zk.close();
        zk = null;
      } catch (InterruptedException e1) {
        logger.debug(e1);
      }
      logger.debug("shutdown complete");
    }
  }
1143692
def check_shutdown_flag(self):
        """"""
        if self.shutdown_requested:
            tornado.ioloop.IOLoop.instance().stop()
            print("web server stopped.")
494832
def _shutdown(self):
    """"""
    if self._proc:
      ret = _shutdown_proc(self._proc, 3)
      logging.info("Shutdown with return code: %s", ret)
      self._proc = None
955637
def _shutdown_unlocked(self, context, lru=None, new_context=None):
        
        LOG.info('%r._shutdown_unlocked(): shutting down %r', self, context)
        context.shutdown()
        via = self._via_by_context.get(context)
        if via:
            lru = self._lru_by_via.get(via)
            if lru:
                if context in lru:
                    lru.remove(context)
                if new_context:
                    lru.append(new_context)
        self._forget_context_unlocked(context)
1058970
final void shutdown() {
        _enabled = false;
        _ignoredSegs.clear();
        
        if(_executor != null && !_executor.isShutdown()) {
            try {
                _executor.shutdown();
                _log.info("shutdown");
            } catch (Exception e) {
                _log.warn("shutdown abort", e);
            }
            
            try {
                _executor.awaitTermination(_shutdownTimeout, TimeUnit.SECONDS);
            } catch (Exception e) {
                _log.warn("shutdown abort", e);
            }
            
            if(_segTarget != null) {
                try {
                    _updateManager.endUpdate(_segTarget);
                } catch (Exception e) {
                    _log.warn("shutdown abort", e);
                }
            }
        }
        
        _executor = null;
        _state = State.DONE;
    }
26801
public function handleShutdown()
    {
        $error = $this->system->getLastError();
        if ($error === null) {
            return;
        }
        if (($error['type'] & error_reporting()) === 0) {
            return;
        }
        if ($this->lastError !== null &&
            $error['message'] === $this->lastError['message'] &&
            $error['file'] === $this->lastError['file'] &&
            $error['line'] === $this->lastError['line']) {
            return;
        }
        $trace = [[
            'file' => $error['file'],
            'line' => $error['line'],
        ]];
        $exc = new Fatal($error['message'], $trace);
        $notice = $this->buildNotice($exc);

        // If we reached this step, we are in shutdown handler.
        // An exception thrown in a shutdown handler will not be propagated
        // to the exception handler. Pass that information along.
        $this->canThrowExceptions = false;

        if ($error && $this->isLevelFatal($error['type'])) {
            // If there was a fatal error,
            // it was not handled in handleError yet.
            $this->handleError(
                $error['type'],
                $error['message'],
                $error['file'],
                $error['line']
            );
        }
		if($error["type"] != 0) {
            //call_user_func($this->errorHandler,new ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line']));
			//log_error( $error["type"], $error["message"], $error["file"], $error["line"] );
		}
    }
679889
def on_consumer_cancelled(self, method_frame):
        
        _logger.info('Consumer was cancelled remotely, shutting down: %r', method_frame)
        if self._channel:
            self._channel.close()
1183296
def shutdown(self):
        """"""
        self.socket.shutdown()

        if scoop:
            if scoop.DEBUG:
                from scoop import _debug
                _debug.writeWorkerDebug(
                    scoop._control.debug_stats,
                    scoop._control.QueueLength,
                )