parameters: (self, close_called)
docstring: Ensures all logging output has been flushed.
docstring_summary: Ensures all logging output has been flushed.
docstring_tokens: Ensures all logging output has been flushed .
function: def __flush(self, close_called):
          """
          Ensures all logging output has been flushed.
          """
  
          with self.__emit_lock:
              buf = self.__emit_buffer
              self.__emit_buffer = []
  
          # The buffer 'buf' is flushed without holding 'self.__emit_lock' to avoid causing callers of
          # self.emit() to block behind the completion of a potentially long-running flush operation.
          if buf:
              with self.__flush_lock:
                  self._flush_buffer_with_lock(buf, close_called)
function_tokens: def __flush ( self , close_called ) : with self . __emit_lock : buf = self . __emit_buffer self . __emit_buffer = [ ] # The buffer 'buf' is flushed without holding 'self.__emit_lock' to avoid causing callers of # self.emit() to block behind the completion of a potentially long-running flush operation. if buf : with self . __flush_lock : self . _flush_buffer_with_lock ( buf , close_called )