[zeromq-dev] zmq_poll long timeout parameter

Thiago Cangussu cangussu at gmail.com
Thu Mar 29 23:55:52 CEST 2012

Maybe there is a problem with the automatic conversion from long to int
when the value is bigger than 32bits, but I'm not sure. The only problem I
had was that my code should follow Google C++ Style Guide (and pass the
cpplint tool check) and it basically says that long should be avoided [1].
I changed my code to use int and that fixed the issue for me.

[1] -

On Thu, Mar 29, 2012 at 5:24 PM, Pieter Hintjens <ph at imatix.com> wrote:

> On Thu, Mar 29, 2012 at 3:01 PM, Thiago Cangussu <cangussu at gmail.com>
> wrote:
> > Sorry if this was already discussed, but I was wondering about the long
> > timeout parameter in zmq_poll. The timeout value is used to call
> > POSIX usleep (zmq.cpp), which uses unsigned int. AFAIK, int and long have
> > different sizes in 64bit platforms. Crossroads changed the parameter to
> > int [1], conforming to the POSIX poll(). Any thoughts?
> Ask these questions when evaluating change:
> * What problem does this change solve?
> * Did any user actually hit this problem?
> * Is fixing this problem worth the effort?
> * Does this break an API and is that worth it?
> -Pieter
> _______________________________________________
> 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/20120329/9a0916e5/attachment.htm>

More information about the zeromq-dev mailing list