cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Progress callbacks, is this a bug?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 10 Feb 2010 23:24:10 +0100 (CET)

On Wed, 10 Feb 2010, Rik Griffin wrote:

> The documentation for the CURLOPT_PROGRESSFUNCTION option states that the
> callback function will be called "roughly once per second".

Yes, that's slightly misleading. The correct phrase should probably be
"roughly once per second or more" or so.

> So, as far as I can see, the behaviour of the library is at odds with what
> the documentation says, in that there is no rate limit on calls of the
> progress callback function.
>
> So which is correct, is this a bug in the docs or the library?

The code is right. It offers the application a higher resolution (at times)
and you always have the option to just not care and return immediately in case
you want to act like the internal progress meter and actually only care once
per second.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-10