[zeromq-dev] Question about zmq_poll ( )

Goswin von Brederlow goswin-v-b at web.de
Thu Feb 20 20:13:54 CET 2014

On Thu, Feb 20, 2014 at 12:55:04PM -0000, Alan Ward wrote:
> Hi,
> I am trying to use zmq_poll with a time-out, such when things get quiet I
> can do something else. And then go back and wait for some more messages.
> However, I find that when I return to the zmq_poll again (very quickly, and
> there are still no messages to process) it immediately times-out again.
> Is this the expected behaviour? Is there a way I can reset the timer?
> Thanks,
> Alan

Don't do that. Use one thread to do your work and one to poll. Having
to switch between polling and working all the time is just wastefull
and complicates the design usualy.


More information about the zeromq-dev mailing list