Stop the background thread.
550480
def stop(self):
        """"""
        self._stop_event.set()
        if not self.persistence:
            return
        if self._cancel_save is not None:
            self._cancel_save()
            self._cancel_save = None
        self.persistence.save_sensors()
983982
def stop(self):
        """"""
        if self.thread:
            self.running = False
            if isinstance(self.stream, ReadWriteStream):
                self.stream.write(b'\0' * self.chunk_size)
            self.thread.join()
            self.thread = None

        self.engine.stop()

        if self.pa:
            self.pa.terminate()
            self.stream.stop_stream()
            self.stream = self.pa = None
56339
public void stop() {
    if (runnerThread == null) {
      return;
    }

    runnerThread.interrupt();

    nsLock.writeLock().lock();
    try {
      if (runnerThread == null) {
        return;
      }

      this.cancel();
      this.close();

      while (runnerThread.isAlive()) {
        runnerThread.interrupt();
        try {
          runnerThread.join(1000);
        } catch (final Exception e) {
          e.printStackTrace();
          return;
        }
      }
      runnerThread = null;
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      nsLock.writeLock().unlock();
    }
  }
1315961
def stop(self):
    
    with self.lock:
      self.halting = True
      self.go.clear()
425193
def __stop(self):  # pragma: no cover
        """"""

        if not self.dispatcher_thread:
            return

        logger.info('Stopping dispatcher')
        self.running = False  # graceful shutdown
        self.dispatcher_thread.join()
        self.dispatcher_thread = None
468073
def Stop(self):
    """"""
    self._shutdown = True
    self._new_updates.set()  # Wake up the transmission thread.

    if self._main_thread is not None:
      self._main_thread.join()
      self._main_thread = None

    if self._transmission_thread is not None:
      self._transmission_thread.join()
      self._transmission_thread = None
1163889
def stop(self):
        """"""
        with self._operational_lock:
            self._bidi_rpc.close()

            if self._thread is not None:
                # Resume the thread to wake it up in case it is sleeping.
                self.resume()
                self._thread.join()

            self._thread = None
383939
def stop(self, ignore_state=False):
        """"""
        self.logger.debug("Stop service")
        self._toggle_running(False, ignore_state)
88953
def stop(self):
        
        self.keep_reading = False
        if self.readthread is not None:
            self.readthread.join()
            self.readthread = None
1362363
public void stop() {
        if (!this.isActive) {
            return;
        }

        coreThread.shutdown();
        criticalThread.shutdown();
        for(int i=0;i<workerThreads.length;i++)
        	workerThreads[i].shutdown();
        
        for(int i=0;i<criticalWorkerThreads.length;i++)
        	criticalWorkerThreads[i].shutdown();
        
        try
        {
        	Thread.sleep(40);
        }
        catch(InterruptedException e)
		{                				
		}
        
        for(int i=0;i<taskQueues.length;i++)
        	taskQueues[i].clear();
        
        for(int i=0;i<heartBeatQueue.length;i++)
        	heartBeatQueue[i].clear();
    }
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()
541033
def Stop(self):
    """"""
    self._Close()

    if self._rpc_thread.isAlive():
      self._rpc_thread.join()
    self._rpc_thread = None
841186
def stop(self):
        """"""
        self._end.value = True
        if self.background_process:
            try:
                self.background_process.terminate()
            except Exception:
                pass
        for task_id, values in self.current_tasks.items():
            try:
                values['proc'].terminate()
            except Exception:
                pass
1106330
def stop(self, timeout=1.0):
        
        if timeout:
            self._running.wait(timeout)
        self._running.clear()
        # Make sure to wake the run thread.
        self._wake.set()
428693
def stop(self) -> None:
        
        if not self._running:
            return

        self._running = False
        self._receiving_queue.put_nowait((TRANSPARENT_EVENT, None))
        self._internal_queue.put_nowait((TRANSPARENT_EVENT, None))
1330659
public synchronized void stop() {
        if (listenerThreads.size() > 0) {
            for (MulticastSocketListenerThread thread : listenerThreads) {
                thread.shutdown();
            }
        }

        listenerThreads.clear();
    }
284466
def stop(self, wait=True):
        
        if self.started:
            self._running.clear()
            self._resume.set()

            # We cannot wait for ourself
            if wait and (threading.current_thread() != self._thread):
                while self._thread.is_alive():
                    self._running.clear()
                    self._resume.set()
                    self._thread.join(timeout=1.0)

            self._started.clear()
            self._resume.clear()