curl / Mailing Lists / curl-library / Single Mail

curl-library

curl_multi_perform semantics of running_handles

From: corey kasten <coreykasten_at_gmail.com>
Date: Tue, 14 Feb 2017 11:08:35 -0800

Hi:

The curl_multi_perform docs say:
> When running_handles is set to zero (0) on the return of this function,
there is no longer any transfers in progress.

Question: Suppose I start with a newly created multi_handle (i.e. no
running handles). Then I make a call sequence of curl_multi_add_handle
<https://curl.haxx.se/libcurl/c/curl_multi_add_handle.html>() (successfully
adding the handle) followed by curl_multi_perform(multi_handle,
&running_handles). Then, what possible values of running_handles can
result, and what do they mean? In other words, does curl_multi_perform
return immediately after scheduling the transfer, and always return with
running_handles=1, or can it return with 0 indicating that the transfer
didn't start yet even though it's been added (i.e it's not "running yet"),
or can it return with 0 indicating the transfer was started AND completed
before curl_multi_perform returned?

Thanks
Corey

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-02-14