Stop the EventHubClient and all its Sender/Receiver clients.
486854
async def stop_async(self):
        
        log.info("%r: Stopping %r clients", self.container_id, len(self.clients))
        self.stopped = True
        await self._close_clients_async()
373879
public synchronized void stop() {
        if (isRunning()) {
            socket.get().close();
            socket.set(null);
            deliverLifecycleAnnouncement(logger, false);
        }
    }
121303
def stop(self):
        """"""
        if self._thread:
            _LOGGER.info("Stopping SocketIO thread...")

            # pylint: disable=W0212
            self._running = False

            if self._exit_event:
                self._exit_event.set()

            self._thread.join()
1085705
def stop(self):
        """"""
        # Signal the thread to stop before handling the next request
        self._listener_thread.stop_flag.set()
        # Send a dummy request in case the http server is currently listening
        try:
            urlopen(
                'http://%s:%s/' % (self.address[0], self.address[1]))
        except URLError:
            # If the server is already shut down, we receive a socket error,
            # which we ignore.
            pass
        # wait for the thread to finish
        self._listener_thread.join()
        self.is_running = False
        log.info("Event listener stopped")
806352
@Invalidate
    public void stop() {
        unregisterConfigurationsExposedAsServices();
        if (registration != null) {
            registration.unregister();
            registration = null;
            try {
                watcher.removeAndStopIfNeeded(configFile.getParentFile());
            } catch (RuntimeException e) { //NOSONAR
                // An exception can be thrown when the platform is shutting down.
                // ignore it.
            }
        }
    }
854199
def stop(self):
        '''
        '''
        self.running = False
        time.sleep(1)
        if self.subscriber is not None:
            self.subscriber.stop()
            self.subscriber = None
375094
def terminate(self):
        """"""
        self._backend_client.clear()
        self._needs_save = False
        self._started = False
        self._expire_cookie = True
        self._send_cookie = True
53008
def stop(self):
        # type: () -> bool
        
        with self._lock:
            if self._state != Bundle.ACTIVE:
                # Invalid state
                return False

            # Hide all services (they will be deleted by bundle.stop())
            for bundle in self.__bundles.values():
                self._registry.hide_bundle_services(bundle)

            # Stopping...
            self._state = Bundle.STOPPING
            self._dispatcher.fire_bundle_event(
                BundleEvent(BundleEvent.STOPPING, self)
            )

            # Notify listeners that the bundle is stopping
            self._dispatcher.fire_framework_stopping()

            bid = self.__next_bundle_id - 1
            while bid > 0:
                bundle = self.__bundles.get(bid)
                bid -= 1

                if bundle is None or bundle.get_state() != Bundle.ACTIVE:
                    # Ignore inactive bundle
                    continue

                try:
                    bundle.stop()
                except Exception as ex:
                    # Just log exceptions
                    _logger.exception(
                        "Error stopping bundle %s: %s",
                        bundle.get_symbolic_name(),
                        ex,
                    )

            # Framework is now stopped
            self._state = Bundle.RESOLVED
            self._dispatcher.fire_bundle_event(
                BundleEvent(BundleEvent.STOPPED, self)
            )

            # All bundles have been stopped, release "wait_for_stop"
            self._fw_stop_event.set()

            # Force the registry clean up
            self._registry.clear()
            return True
1028521
def stop(self):
        """"""
        if self.closed:
            raise ConnectionClosed()

        if self.read_watcher.active:
            self.read_watcher.stop()
        if self.write_watcher.active:
            self.write_watcher.stop()
952941
def stop(self):
        
        # Stop the loop
        self._stop_event.set()

        # Join the thread
        self._thread.join()
        self._thread = None

        # Close the socket
        close_multicast_socket(self._socket, self._group)
17095
def stop(self):
        
        LOGGER.debug("exiting publish")
        if self._publisher is not None:
            self._publisher.stop()
            self._publisher = None
        if self._broadcaster is not None:
            self._broadcaster.stop()
            self._broadcaster = None
1020308
def stop(self):
        
        with self.__receiver_thread_exit_condition:
            while not self.__receiver_thread_exited and self.is_connected():
                self.__receiver_thread_exit_condition.wait()
13902
def stop(self):
        """"""
        if self._outstanding:
            _LOGGER.warning('There were %d outstanding requests',
                            len(self._outstanding))

        self._initial_message_sent = False
        self._outstanding = {}
        self._one_shots = {}
        self.connection.close()
1010359
public void stop() {

    this.stop = true;

    if (this.thread != null && this.thread.isAlive()) {
      this.thread.interrupt();

      for (TrackerClient client : this.clients.values()) {
        client.close();
      }

      try {
        this.thread.join();
      } catch (InterruptedException ie) {
        // Ignore
      }
    }
    this.myPeers.clear();

    this.thread = null;
  }
88680
public void stop() {
    try {
      mRMClient.unregisterApplicationMaster(FinalApplicationStatus.SUCCEEDED, "", "");
    } catch (YarnException e) {
      LOG.error("Failed to unregister application", e);
    } catch (IOException e) {
      LOG.error("Failed to unregister application", e);
    }
    mRMClient.stop();
    // TODO(andrew): Think about whether we should stop mNMClient here
    mYarnClient.stop();
  }
48039
def halt(self, message, emitter, *args, **kwargs):
        ''''''
        self.process_event((FINISH, self, (), {}))
        global_event_queue.clear()
1075804
def stop(self):
        """"""
        self.logger.warning("Stop executed")
        try:
            self._socket.close()
        except Exception:
            self.logger.error("Error while closing socket")
            raise VelbusException("Error while closing socket")
        time.sleep(1)