Re: [zeromq-dev] JZMQ - Context.term hangs when PUSH/PULL happen on the same thread.

2013-02-07 Thread Trevor Bernard
Thanks for the explanation. On Thu, Feb 7, 2013 at 4:15 AM, Pieter Hintjens 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

Re: [zeromq-dev] JZMQ - Context.term hangs when PUSH/PULL happen on the same thread.

2013-02-07 Thread Pieter Hintjens
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 eve

Re: [zeromq-dev] JZMQ - Context.term hangs when PUSH/PULL happen on the same thread.

2013-02-06 Thread Trevor Bernard
I think I found my own solution. I didn't close the sockets on the HangTest first On Wed, Feb 6, 2013 at 10:21 PM, Trevor Bernard 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 th

[zeromq-dev] JZMQ - Context.term hangs when PUSH/PULL happen on the same thread.

2013-02-06 Thread Trevor Bernard
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 explanat