[zeromq-dev] JZMQ - Context.term hangs when PUSH/PULL happen on the same thread.
ph at imatix.com
Thu Feb 7 09:15:30 CET 2013
This was a long discussion at the time. Socket shutdown is kind of
difficult given that sockets can migrate between threads. libzmq at
some points waits for handshaking that can never arrive.
The solution is to (a) always close sockets before terminating the
context, and (b) set linger to 0 on every socket at least before
CZMQ for example tracks opened sockets per context and closes them
automatically when needed.
On Thu, Feb 7, 2013 at 3:21 AM, Trevor Bernard <trevor.bernard at gmail.com> wrote:
> Any one know why this hangs when you try to term the context.
> But if I run the sockets on a different thread, the context terms fine.
> I've seen a few mentions of this but I've yet to find a good explanation of why?
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev