cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Common designs for using libcurl (Thread-Safety)

From: Vladimir Grishchenko <vladgri_at_hotmail.com>
Date: Wed, 7 Sep 2011 11:46:01 -0700

> Date: Wed, 7 Sep 2011 10:25:34 -0700
> Subject: Common designs for using libcurl (Thread-Safety)
> From: thejunkjon_at_gmail.com
> To: curl-library_at_cool.haxx.se
>
>
> Is there a common, accepted approach for using libcurl efficiently,
> maximizing throughput, and also not running into any of the threading
> issues described above in the link?
>

Have a look at the multi-handle interface examples. You don't need a thread per connection, in most cases all network IO can be handled by a single thread. And having more threads than cores/CPUs on your system is likely a waste of resources.

-V.
                                               

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