[zeromq-dev] Perl question: ZMQ + AnyEvent

Daisuke Maki lestrrat at gmail.com
Sat Sep 22 02:39:47 CEST 2012

Hi, I'm the maintainer of perl ZMQ modules.
I'm away fron my computer atm, so can only guess, but does it work if you
put a


before creating the IO watcher?

and yes, for new code you should be using ZMQ::LibMQ2.

2012年9月22日土曜日 Robert Olson olson at mcs.anl.gov:
> On Sep 21, 2012, at 5:31 PM, Pedro Melo wrote:
>> Hi,
>> On Fri, Sep 21, 2012 at 9:11 PM, Robert Olson <olson at mcs.anl.gov> wrote:
>>> On Sep 21, 2012, at 2:30 PM, Robert Olson wrote:
>>>> However, in my client, if I set up AnyEvent to wait for the reply from
the broker I am never notified. The client works perfectly if I use a
synchronous receive on the socket.
>>> Interesting: in the async code if I issue a nonblocking recv() before I
drop into the AnyEvent wait code, it works properly. Is this the expected
>> My gut felling when I read your code was that it was correct, it would
>> be the code I would write in this situation. Adding that nonblocking
>> read seems to be clearing some flag that signals the socket as
>> "nothing more to read at the moment" but I don't remember the
>> existence of such a flag…
>> I would do one thing though: move from ZeroMQ binding to the new ZMQ
>> bindings. The second ones are written as a direct map to the C API
>> (like ZeroMQ::Raw) but are supported, where as ZeroMQ has several open
>> bugs without answers. One particular problem is with ZeroMQ and
>> fork's, you'll get a libzmq assertion. Fixed in ZMQ.
> Ah, excellent - I hadn't come across the ZMQ bindings. I'll look into
> Thanks.
> --bob
> _______________________________________________
> 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/20120922/4d8e19c0/attachment.htm>

More information about the zeromq-dev mailing list