[zeromq-dev] JZMQ - Context.term hangs when PUSH/PULL happen on the same thread.
trevor.bernard at gmail.com
Thu Feb 7 16:08:39 CET 2013
Thanks for the explanation.
On Thu, Feb 7, 2013 at 4:15 AM, Pieter Hintjens <ph at imatix.com> wrote:
> 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
> closing it.
> 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
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
More information about the zeromq-dev