bastibe / transplant

Transplant is an easy way of calling Matlab from Python
https://transplant.readthedocs.io
Other
110 stars 26 forks source link

Respond gracefully to disrupted connection. #26

Closed bastibe closed 7 years ago

bastibe commented 7 years ago

If a user calls exit or quit in a running Matlab process, it dies. Consequently, transplant hangs.

bastibe commented 7 years ago

Should be fixed in 64a504be82c82d4b6cf2c2d1c7422f12a97f502a. Finally!

Instead of using ZMQ's socket_send* and socket_recv* directly, Transplant now first calls socket_poll, then the non-blocking variants of socket_send* and socket_recv*. This has the advantage that socket_poll has an optional timeout, after which Transplant now periodically checks if the process died prematurely, and raises a RuntimeError if the process died.