Thanks for the explanation.
On Thu, Feb 7, 2013 at 4:15 AM, Pieter Hintjens <[email protected]> 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. > > -Pieter > > On Thu, Feb 7, 2013 at 3:21 AM, Trevor Bernard <[email protected]> > wrote: >> Any one know why this hangs when you try to term the context. >> >> https://gist.github.com/trevorbernard/4727863 >> >> But if I run the sockets on a different thread, the context terms fine. >> >> https://gist.github.com/trevorbernard/4727870 >> >> I've seen a few mentions of this but I've yet to find a good explanation of >> why? >> >> -Trev >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
