I responded to: "To honour timeouts in the poll we have to measure
time. Which can be inefficient in tight loops using zmq_poll."

My point is you wouldn't have to measure time on every single call,
just approximately once every <whatever precision you wanted> as you
approach the timeout time, approximated by its number of repetitions.
It could use the time since the last call to determine the speed of
the polling loop, to optimize itself to do this (i.e. very coarse
checking near the start, finer checking nearer the timeout time).

I might be way off but my basic point is that absolute timeout
precision is really unimportant.

Sorry if this had no relevance.

On 3 September 2010 14:21, Martin Sustrik <[email protected]> wrote:
> Naveen,
>
>> Sorry if this is ignorant, but timeouts don't have to be precise.
>> Everybody uses them in a rough way anyway (I think).
>
> The point is that the function returns on random 0MQ internal event. So for
> example may set the timeout to 1 hour, but event occurs in 1 second and
> zmq_poll exits.
>
> Martin
>
>
>
>
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to