[zeromq-dev] possible ZeroMQ bugs
Martin Sustrik
sustrik at 250bpm.com
Tue Jan 11 09:09:25 CET 2011
On 01/11/2011 08:40 AM, MinRK wrote:
> Does zeromq handle closing contexts with active sockets just fine? If
> so, then this is a pyzmq bug, and should be reported there (link below).
No it does not. It has to support ETERM mechanism. Meaning that socket
returns ETERM when context it closed, the user handles the ETERM by
closing the socket and thus allowing zmq_term() to exit, which in turn
allows main thread to exit and close the application as a whole.
> In many cases it does respond just fine to KeyboardInterrupts. For
> instance, stuck sends, recvs, and polls all will properly raise
> KeyboardInterrupt if you give it a ctrl-C. I'm not sure what the
> explanation is for Context.term not allowing for sigint. The method
> that is stuck is ``no_sockets_sync.wait ();`` in ctx.terminate(). Is
> that an interruptible method? If so, then that's a pyzmq bug we should
> investigate.
It's not interruptible. Something interruptible, such as socketpair
should be used instead of mutex. This can be considered a bug IMO.
Martin
More information about the zeromq-dev
mailing list