cURL / Mailing Lists / curl-library / Single Mail


Re: Asking for the reversion of the pselect() patch

From: Yang Tse <>
Date: Mon, 12 Mar 2007 04:05:52 +0100

2007/3/11, Yang Tse wrote:

> 2007/3/11, Daniel Stenberg wrote:
> > I think we can (and should) make the change that allows the progress callback
> > to be called more frequently in a separate change that I don't think anyone
> > would mind or argue much about. No need to combine these two as they're
> > somewhat unrelated.
> Yes they are unrelated, and I have no problem with allowing the
> progress callback being called more frequently.

I hate to say this, but the part of the patch that should allow the
progress callback being called more frequently also introduces its own

In Curl_pgrsUpdate the code which restricted the execution of part of
itself to only once a second is moved after the increment of the
speeder_c counter.

Without the patch this counter is incremented only once a second even
if Curl_pgrsUpdate() is called more frequently. With the patch it
would be incremented _every_ time Curl_pgrsUpdate() is called.

Without the patch this counter, of int type, wouldn't wrap at least
until 2^32 seconds have elapsed. With the patch the type should be
changed from int to curl_off_t, and even with that there's no way to
know or estimate when it will wrap.

Another problem is that all speed calculations depend on the fact that
each 'speed sample' is taken once a second.

The patch for this functionality in its current state needs additional
work, its not a matter of changing a couple of lines.

Bryan Henderson: I very much appreciate your willingness to contribute
and hope that this review only encourages you to find a better
solution, in benefit of all, that introduces less problems

Received on 2007-03-12