cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: --enable-threaded-resolver "breaks" qemu's curl driver

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 11 Jun 2013 09:14:57 +0200 (CEST)

On Mon, 10 Jun 2013, Richard W.M. Jones wrote:

>> 1 - The code uses the multi_socket API but without
>> CURLMOPT_TIMERFUNCTION.

>> 2 - its use of curl_multi_socket_all()

> I suspect that (1) is not fixable in current qemu. See my reasoning here:
> https://bugzilla.redhat.com/show_bug.cgi?id=971790#c21

Aha, yes without a timer the multi_socket API will be a bit tricky to take
full advantage of.

> Re (2) I tried to replace curl_multi_socket_all with curl_multi_perform,
> however that does not work AFAICT. It could be related to the other
> problem.

curl_multi_perform() is not event-based though so it is quite a different
beast than curl_multi_socket_all() and you most likely will need to change
some logic if you decide to switch function and paradigm.

The recommended API for event-based libcurl use, is to use
curl_multi_socket_action() and only tell libcurl when there's activity on a
specific file descriptor (or if there's a timeout).

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-06-11