def start(self):
        """Starts the background thread.

        Additionally, this registers a handler for process exit to attempt
        to send any pending data before shutdown.
        """
        with self._lock:
            if self.is_alive:
                return

            self._thread = threading.Thread(
                target=self._thread_main, name=_WORKER_THREAD_NAME)
            self._thread.daemon = True
            self._thread.start()
            atexit.register(self._export_pending_data)
def start ( self ) : with self . _lock : if self . is_alive : return self . _thread = threading . Thread ( target = self . _thread_main , name = _WORKER_THREAD_NAME ) self . _thread . daemon = True self . _thread . start ( ) atexit . register ( self . _export_pending_data )
Starts the background thread.

        Additionally, this registers a handler for process exit to attempt
        to send any pending data before shutdown.