[zeromq-dev] adding timeout in zmq_poll
sustrik at 250bpm.com
Mon Dec 28 11:42:36 CET 2009
> Ok. If we choose nanoseconds, there is two moments:
> 1) Must we add two parameters to zmq_poll(): int timeout_sec, int
> timeout nsec?
What about using unsigned long and microseconds? Even if ulong resolves
to 32 bit value, max timeout would be 4295 seconds i.e. more than an
hour. That should be enough for everyone. Or won't it?
> 2) If user specified too small timeout (1 nsec) must we increase this
> timeout to one ms in linux and 1microsec in windows?
I would rather decrease the number. The semantics of the timeout is
"zmq_poll will return before the timeout expires" (see the previous
discussion on returning with no events).
More information about the zeromq-dev