cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: curl_easy vs curl_multi - performance

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 14 Jun 2011 08:15:52 +0200 (CEST)

On Mon, 13 Jun 2011, Paolo Piacentini wrote:

> Why wait(seconds=0.1) or higher allowed curl_multi_fdset to work fine (never
> in seg-fault) despite that NULL pointer.

Because you only caused the select() to wait/timeout every time libcurl wanted
to send data - so the only downside of your mistake was to add a delay within
a loop.

When using the (ordinary) multi interface, the select() call the application
is doing only serves the purpose of waiting until there's action on the
socket(s). When libcurl is then called, it will check for itself (again) what
it can or can't do on the socket.

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