cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Advantages of mutli handle over multithread easy handle

From: Ben Noordhuis <info_at_bnoordhuis.nl>
Date: Tue, 12 Apr 2011 14:19:53 +0200

On Tue, Apr 12, 2011 at 13:58, Vishakha Vaidya <vvaidya_at_adobe.com> wrote:
> I use easy interface in a threaded model and am considering a move to multi handles again using a thread model. I prototyped the two but don't see a gain in performance in terms of time taken, is that expected ?

Performance isn't quite the same thing as scalability. You'll be able
to process many more simultaneous requests with the multi interface
because a pollset has a much lower resource footprint than a thread
pool.

This probably matters less for clients than for servers; clients don't
often have to handle hundreds of concurrent requests.

> One advantage I could think of is that since there is simultaneous transfer happening and they're non blocking, I can cancel transfer of selected files from the job queue rather than having to abort the entire operation. Am I thinking on the right lines ?

Yes, you are.

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