[zeromq-dev] odd zmqstream.py behavior
Steve Huffman
steve at hipmunk.com
Sat Oct 2 03:58:04 CEST 2010
I don't think so. I'll try the new version, but what the behavior I'm seeing
is zmq_close() doesn't return when an exception is thrown in the callback.
On Sat, Oct 2, 2010 at 1:52 AM, Pieter Hintjens <ph at imatix.com> wrote:
> If you're using 0MQ/2.0.x then when you close a socket any messages
> still in flight (which means the ones you just sent) are dropped.
> This is presumably what you're seeing. It's fixed in 2.1.
>
> On Fri, Oct 1, 2010 at 9:09 PM, Steve Huffman <steve at hipmunk.com> wrote:
> > Hi All,
> > I'm using pyzmq and zmqstream and have encountered what I think is an
> error.
> > My code looks like this:
> > s = ctx.socket(zmq.PUSH)
> > s.bind('tcp://127.0.0.1:5555')
> > self.stream = zmqstream.ZMQStream(s, loop)
> > self.stream.on_send(echo)
> > def echo(*a, **kw):
> > blah
> >
> > The on_send callback, echo(), has an deliberate error in it. If an
> exception
> > occurs in _run_callback in zmqstream.py, the call to self.close() fails
> (it
> > never returns). I've managed to follow this to the eventual call to
> > zmq_close() in _zmq.pyx/_zmq.c, but don't know enough about zeromq to
> debug
> > further.
> > Thanks,
> > Steve
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> >
> >
>
>
>
> --
> -
> Pieter Hintjens
> iMatix - www.imatix.com
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20101002/c47de251/attachment.htm>
More information about the zeromq-dev
mailing list