code: def wait_until_finished(self):
          
          try:
              self.thread.join()
          except KeyboardInterrupt:
              self._logger.debug('Keyboard interrupt detected, stopping driver.')
              self._active = False
              self._wake_queue()
docs: Blocking method to wait until the driver finished its execution.