From 8e652ff834ef923ede0c93b3942eda3a21fddab5 Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 12 Aug 2025 17:15:17 +0200 Subject: [PATCH] w --- .../timepix/timepix_fly_client/timepix_fly_backend.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py b/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py index 27ba936..3eda5d3 100644 --- a/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py +++ b/superxas_bec/devices/timepix/timepix_fly_client/timepix_fly_backend.py @@ -140,6 +140,12 @@ class TimepixFlyBackend: """Cleanup method to stop all running processes.""" self.timepix_fly_client.shutdown() self._data_thread_shutdown_event.set() + if self._data_thread.is_alive(): + self._data_thread.join(timeout=1) + if self._data_thread.is_alive(): + logger.info( + f"Data thread poll loop of timepix_fly_client did not stop within 1 second." + ) if self._socket_server is not None: try: self._socket_server.close()