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 13:37:54 +0200

On Tue, Apr 12, 2011 at 13:27, Vishakha Vaidya <vvaidya_at_adobe.com> wrote:
> What would be the advantages of using a multi handle over using multiple
> threads using easy handles (referring to example multithread.c) ?
>
> I understand the multihandle is non blocking, but how would that help me if
> I’m writing an ftp client ?

Scalability. Threads are expensive, a pollset is cheap.

Ease of use. No need to worry about thread safety issues. But this can
go both ways: the per-thread model is conceptually easier for some use
cases than an interruptible state machine.

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