[zeromq-dev] Using ZMQ_FD with select
schmurfy at gmail.com
Sun Feb 19 14:29:41 CET 2012
But the descriptor returned by ZMQ_FD is not the "real" descriptor right ?
>From my understanding it is just a way to use zeromq sockets with an
external event loop and in general it works quite well.
On 19 February 2012 14:06, john skaller <skaller at users.sourceforge.net>wrote:
> On 19/02/2012, at 9:02 PM, Schmurfy wrote:
> > Now I really feel stupid xD
> > Thanks for pointing this out, not really intuitive.
> > I am back to square one since it does not explain my problem then xD
> > But I am curious what was your problem with REQ/REP if not this one
> because I also have problems with REQ/REP where the other sockets type
> works as intended.
> > I just can't pinpoint what exactly is wrong and where.
> Somehow my message didn't get posted.
> What actually happens is that ZMQ is doing a select itself,
> and it loads the message in a background thread so fast that
> by the time YOU do the select, there's nothing to read on the fd.
> ZMQ has already read it.
> You must use zmq_poll. You cannot use select yourself on a fd
> owned by ZMQ, that leads to a race:)
> john skaller
> skaller at users.sourceforge.net
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev