parameters: ()
docstring: Signals the flush thread to stop and waits until it does.
docstring_summary: Signals the flush thread to stop and waits until it does.
docstring_tokens: Signals the flush thread to stop and waits until it does .
function: def stop_thread():
      """
      Signals the flush thread to stop and waits until it does.
      """
  
      with _FLUSH_THREAD_LOCK:
          if _FLUSH_THREAD is None:
              raise ValueError("FlushThread hasn't been started")
  
      # Add sentinel value to indicate when there are no more loggers to process.
      _LOGGER_QUEUE.put(None)
      _FLUSH_THREAD.join()
function_tokens: def stop_thread ( ) : with _FLUSH_THREAD_LOCK : if _FLUSH_THREAD is None : raise ValueError ( "FlushThread hasn't been started" ) # Add sentinel value to indicate when there are no more loggers to process. _LOGGER_QUEUE . put ( None ) _FLUSH_THREAD . join ( )