Stop the rpc queue from inside the event loop.
436541
async def stop(self):
        """"""

        if self._rpc_task is not None:
            self._rpc_task.cancel()

        try:
            await self._rpc_task
        except asyncio.CancelledError:
            pass

        self._rpc_task = None
271632
def stop(self):
        
        self.listener.setsockopt(LINGER, 1)
        self.loop = False
        with nslock:
            self.listener.close()
877323
def stop(self):
        """"""
        with self.lock:
            self._message_received(ConnectionClosed(self._file, self))
142227
def cancel(self, event):
        
        with self._lock:
            self._queue.remove(event)
            heapq.heapify(self._queue)
876069
def stop(self):
        """"""

        if self._started is False:
            raise ArgumentError("EmulationLoop.stop() called without calling start()")

        self.verify_calling_thread(False, "Cannot call EmulationLoop.stop() from inside the event loop")

        if self._thread.is_alive():
            self._loop.call_soon_threadsafe(self._loop.create_task, self._clean_shutdown())
            self._thread.join()
370331
def stop(self):
        
        # self.loop.call_soon_threadsafe(self.loop.stop)
        # self.loop.stop()
        # self._longPoll.cancel()
        # self._shortPoll.cancel()
        if self.connected:
            LOGGER.info('Disconnecting from MQTT... {}:{}'.format(self._server, self._port))
            self._mqttc.publish(self.topicSelfConnection, json.dumps({'node': self.profileNum, 'connected': False}), retain=True)
            self._mqttc.loop_stop()
            self._mqttc.disconnect()
        try:
            for watcher in self.__stopObservers:
                watcher()
        except KeyError as e:
            LOGGER.exception('KeyError in gotConfig: {}'.format(e), exc_info=True)
1279388
def stop(self):
        """"""
        self._stopped = True
        threads = [self._accept_thread]
        threads.extend(self._server_threads)
        self._listening_sock.close()
        for sock in list(self._server_socks):
            try:
                sock.shutdown(socket.SHUT_RDWR)
            except socket.error:
                pass

            try:
                sock.close()
            except socket.error:
                pass

        with self._unlock():
            for thread in threads:
                thread.join(10)

        if self._uds_path:
            try:
                os.unlink(self._uds_path)
            except OSError:
                pass
144575
def loop_stop(self, force=False):
        
        if self._thread is None:
            return MQTT_ERR_INVAL

        self._thread_terminate = True
        self._thread.join()
        self._thread = None
118235
public void stop() {
        if (mMonitorStarted) {
            mMonitorStarted = false;
            Looper.getMainLooper().setMessageLogging(null);
            mBlockCanaryCore.stackSampler.stop();
            mBlockCanaryCore.cpuSampler.stop();
        }
    }
308951
async def stop(self):
        """"""
        self._shutdown = True

        if self.wsck:
            _LOGGER.info('Closing Emby server websocket.')
            await self.wsck.close()
            self.wsck = None

        if self._own_loop:
            _LOGGER.info("Shutting down Emby server loop...")
            self._event_loop.call_soon_threadsafe(self._event_loop.stop)
157532
void stopNow() {
        assert currentThread() != this : "stopNow must not be called on the migration thread";
        running = false;
        queue.clear();
        interrupt();
        boolean currentThreadInterrupted = false;
        while (true) {
            try {
                join();
            } catch (InterruptedException e) {
                currentThreadInterrupted = true;
                continue;
            }
            break;
        }
        if (currentThreadInterrupted) {
            currentThread().interrupt();
        }
    }
1089258
def stop(self):
        """"""

        for tile in self._tiles.values():
            tile.signal_stop()

        for tile in self._tiles.values():
            tile.wait_stopped()

        super(TileBasedVirtualDevice, self).stop()
1301709
def stop(self):
        
        self.publish.setsockopt(zmq.LINGER, 1)
        self.publish.close()
        return self
1176684
def stop(self):
    """"""

    log.info('Stopping %s' % self)

    pids = list(self._processes)

    # Clean up the context
    for pid in pids:
      self.terminate(pid)

    while self._connections:
      pid = next(iter(self._connections))
      conn = self._connections.pop(pid, None)
      if conn:
        conn.close()

    self.__loop.stop()
77196
def event_listen_stop(self):
		''''''
		self._loop_stop = True
		c.pa.mainloop_wakeup(self._loop)
1278926
def stop(self):
        """"""
        if self.running and self.num_workers:
            for worker in self.workers:
                self.queue.put(None)
            for worker in self.workers:
                worker.join()
            # Free up references held by workers
            del self.workers[:]
            self.queue.join()
        self.running = False
182234
def stop(self, msg='Thread stopped'):
        """"""
        with self._lock:
            if not self._thread_running:
                return
            self._thread_running = False
        self._queue.put(_BaseSignalFxIngestClient._QUEUE_STOP)
        self._send_thread.join()
        _logger.debug(msg)