[zeromq-dev] zmq_term() blocks in 2.1

2011-01-10 Thread David Kantowitz
Hello, In v2.1 zmq_term() will block if there are any open sockets -- in previous versions of ZMQ zmq_term() was non-blocking. For my application this causes problems, so I've changed my copy of ctx::terminate() to be non-blocking. I issue all the stop() calls and return EAGAIN if there are sock

Re: [zeromq-dev] zmq_term() blocks in 2.1

2011-01-10 Thread David Kantowitz
> > > Date: Mon, 10 Jan 2011 18:36:19 -0600 > From: Chuck Remes > Subject: Re: [zeromq-dev] zmq_term() blocks in 2.1 > To: ZeroMQ development list > Message-ID: <5aaad829-f8ed-447d-9d88-568c8198c...@mac.com> > Content-Type: text/plain; CHARSET=US-ASCII > >

Re: [zeromq-dev] zmq_term() blocks in 2.1

2011-01-11 Thread David Kantowitz
Martin, Thanks for the reply. My difficulty is specifically these lines in ctx::terminate(): if (no_sockets_notify) no_sockets_sync.wait (); I'm using 0MQ with Matlab and the Matlab interactive loop is basically single threaded, so function call that blocks will freeze the entire

Re: [zeromq-dev] ZMQ Crash from unknown DNS name

2011-01-26 Thread David Kantowitz
the resolved name, the name gets looked-up a second time in the i/o thread. For my application both of these are acceptable. I've pasted my change below in case you want to do something similar. Best regards, David Kantowitz === (+19,-1) src/socket_base.cpp === @@ -278,6 +278

Re: [zeromq-dev] ZMQ Crash from unknown DNS name

2011-01-27 Thread David Kantowitz
Martin, On Wed, Jan 26, 2011 at 11:42 PM, Martin Sustrik wrote: > Hi David, > >> >> My quick fix was to check the address and interface in >> socket_base::bind() and socket_base::connect(). >> >> I've pasted my change below in case you want to do something similar. >> > > The real solution IMO w

Re: [zeromq-dev] ZMQ Crash from unknown DNS name

2011-01-27 Thread David Kantowitz
On Thu, Jan 27, 2011 at 12:44 AM, Martin Sustrik wrote: > On 01/27/2011 09:28 AM, David Kantowitz wrote: > > The real solution IMO would be to introduce a new "address" >>structure that would contain the address as such, with no elements >>to resolve. &

Re: [zeromq-dev] zeromq-dev Digest, Vol 38, Issue 57

2011-02-21 Thread David Kantowitz
On Sat, Feb 19, 2011 at 10:34 PM, Pieter Hintjens wrote: > On Sun, Feb 20, 2011 at 6:22 AM, David Kantowitz > wrote: > > > Oddly I find the current format of http://api.zeromq.org/ much easier to > > read. I realize all the text is the same, but something about t