Skip to content

Commit 0db2a95

Browse files
timblakelycopybara-github
authored andcommitted
Ensure that the interface is notified to exit when an exception occurs, before the main thread is interrupted.
PiperOrigin-RevId: 947852128
1 parent bc6daf0 commit 0db2a95

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ffn/inference/executor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ def _dispatcher(self, data: jnp.ndarray, client_ids: Sequence[int]):
381381
ret = self._apply_fn(data)
382382
except Exception as e: # pylint:disable=broad-except
383383
logging.exception(e)
384+
self._interface.exit_request.set()
384385
# Terminate the whole program on failure.
385386
_thread.interrupt_main() # pytype: disable=module-attr
386387
raise e

0 commit comments

Comments
 (0)