From 187860a4fe62d98f74358d7a52e380ce386cd34e Mon Sep 17 00:00:00 2001 From: Tim Blakely Date: Thu, 13 Aug 2026 11:14:36 -0700 Subject: [PATCH] Ensure that the interface is notified to exit when an exception occurs, before the main thread is interrupted. PiperOrigin-RevId: 964189849 --- ffn/inference/executor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ffn/inference/executor.py b/ffn/inference/executor.py index 5907f6e..d015f79 100644 --- a/ffn/inference/executor.py +++ b/ffn/inference/executor.py @@ -381,6 +381,7 @@ def _dispatcher(self, data: jnp.ndarray, client_ids: Sequence[int]): ret = self._apply_fn(data) except Exception as e: # pylint:disable=broad-except logging.exception(e) + self._interface.exit_request.set() # Terminate the whole program on failure. _thread.interrupt_main() # pytype: disable=module-attr raise e