Stop the stream and wait for it to stop.

        See :meth:`stop` for the general stopping conditions. You can assume
        that :meth:`stop` is the first thing this coroutine calls.
357570
def wait_stop(self):
        
        if not self.running:
            return
        self.stop()
        try:
            yield from self._task
        except asyncio.CancelledError:
            pass
882844
def stop(self, timeout=None):
        
        with self._lock:
            if self._thread:
                self._queue.put_nowait(self._terminator)
                self._thread.join(timeout=timeout)
                self._thread = None
                self._thread_for_pid = None
819829
def stop(self):
        
        self._cease.set()
        time.sleep(0.1)  # let the thread closing correctly.
        self._isRunning = False
1119915
def stop(self):
        
        self.stopping = True
        # Cancel any outstanding request to our client
        if self._batch_send_d:
            self._batch_send_d.cancel()
        # Do we have to worry about our looping call?
        if self.batch_every_t is not None:
            # Stop our looping call, and wait for the deferred to be called
            if self._sendLooper is not None:
                self._sendLooper.stop()
        # Make sure requests that wasn't cancelled above are now
        self._cancel_outstanding()
        return self._sendLooperD or succeed(None)
90825
def stop(self, handle, reason=None):
        """"""
        params = self._get_params(reason=reason)
        self._transport.stop(handle, params)
149705
def _end_channel(self, channel):
        
        self.stop_on_empty_queue[channel] = True

        # by joining the we wait until its loop finishes.
        # it won't loop forever since we've set self.stop_on_empty_queue=True
        write_thread = self.thread_write_instances[channel]

        thread_join_non_blocking(write_thread)
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()
756119
def stop(self, wait=True):
        
        logger.info("Primitive %s stopped.", self)
        StoppableThread.stop(self, wait)
114503
public void stop() throws InterruptedException {
		if (!isStarted.get()) {
			throw new IllegalStateException("The StreamServer is not started");
		}
		stopServer();
		stopClients();
		closeSocket();
		try {
			waitForServerToTerminate();
			isStarted.set(false);
			stopServer();
		} catch (InterruptedException e) {
			logger.error("InterruptedException while waiting for termination", e);
			throw e;
		}
	}
147496
async def stop(self):
        
        if self.__started:
            self.__transport._unregister_rtp_sender(self)
            self.__rtp_task.cancel()
            self.__rtcp_task.cancel()
            await asyncio.gather(
                self.__rtp_exited.wait(),
                self.__rtcp_exited.wait())
1295300
def stop(self) -> None:
        
        if not self.running:
            return
        try:
            self.wait(timeout_s=0)
            # If we get here: stopped already
        except subprocess.TimeoutExpired:  # still running
            for kill_level in self.ALL_KILL_LEVELS:
                tried_to_kill = self._terminate(level=kill_level)  # please stop
                if tried_to_kill:
                    try:
                        self.wait(timeout_s=self.kill_timeout_sec)
                        break
                    except subprocess.TimeoutExpired:  # failed to close
                        self.warning("Subprocess didn't stop when asked")
                        pass  # carry on escalating
        self.close_logs()
        self.running = False
552136
def stop(self):
        
        Global.LOGGER.info("stopping the flow manager")
        self._stop_actions()
        self.isrunning = False
        Global.LOGGER.debug("flow manager stopped")
768692
def stop(self):
        
        if self._http_server is not None:
            self._http_server.stop()
        tornado.ioloop.IOLoop.instance().add_callback(
            tornado.ioloop.IOLoop.instance().stop)
1351661
def stop(self):
        
        self._stop.set()
        if self._channel is not None:
            self._channel.close()
1146188
def stop &block
      if block_given? then
        @stopped = true
        @suspended = false
        # Wait till something is put on the dead queue...
        # This stops us from acquiring the mutex until after @thread
        # has processed @stopped set to true.
        sig = @dead.deq
        # The cron thread should be dead now, or wrapping up (with the
        # acquired mutex)... 
        @mutex.synchronize {
          while @thread.alive?
            sleep 0.2
          end
          block.call(self)
        }
      end
    end
1168788
public synchronized void stop()
  {
    running.set(false);
    if(thread.isAlive()) {
      thread.interrupt();
      wait(this, STOP_TIMEOUT);
    }
  }
730647
void stopIfNecessary() {
    synchronized (lock) {
      if (goAway && !stopped && streams.size() == 0) {
        stopped = true;
      } else {
        return;
      }
    }
    listener.transportTerminated();
  }