def stop(self, msg='<STR_LIT>'):
with self._lock:<EOL><INDENT>if not self._thread_running:<EOL><INDENT>return<EOL><DEDENT>self._thread_running = False<EOL><DEDENT>self._queue.put(_BaseSignalFxIngestClient._QUEUE_STOP)<EOL>self._send_thread.join()<EOL>_logger.debug(msg)<EOL>
Stop send thread and flush points for a safe exit.