Re: [zeromq-dev] non-clean exit - Context was terminated

2013-09-02 Thread Pieter Hintjens
The message gets printed when you try to set a socket option on a socket after the thread (or another) has terminated the context. I'm not sure if printing the message is a good response... that could be fixed. However it's not an error; it's a normal shutdown. One thread terminates the context

Re: [zeromq-dev] non-clean exit - Context was terminated

2013-09-02 Thread Pieter Hintjens
OK, so in your modified code, when you get NULL back from a recv call, you have to exit the loop. This is how the blocking recv functions in CZMQ signal an ETERM situation. zctx_interrupted will not be raised on all threads, only the one that caught the Ctrl-C. On Mon, Sep 2, 2013 at 5:19 AM,

[zeromq-dev] non-clean exit - Context was terminated

2013-09-01 Thread Chris Laws
After more investigation it appears that the problem I am seeing is associated with the thread code sitting blocked in recv until the main thread performs the context shutdown. When the thread begins shutting down it goes through the termination sequence of events, one of which is to set the

[zeromq-dev] non-clean exit - Context was terminated

2013-08-30 Thread Chris Laws
I am learning zeromq and have built a small-ish application using czmq that generally works well. However, when I shut it down using Ctrl+C, it prints Context was terminated to standard out. I presume this indicates a non-clean exit and I would like to fix this. I have read the guide section