def stop(self, msg='Thread stopped'):
        """Stop send thread and flush points for a safe exit."""
        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)
Stop send thread and flush points for a safe exit.