code: def stop_sync(self):
          
  
          if self._control_thread is not None and self._control_thread.is_alive():
              self._control_thread.stop()
              self._control_thread.join()
  
          if self.jlink is not None:
              self.jlink.close()
docs: Synchronously stop this adapter and release all resources.