cURL / Mailing Lists / curl-library / Single Mail


Re: Link between curl_easy handle and connection

From: Isaac Boukris <>
Date: Mon, 7 Mar 2016 22:24:29 +0200

On Mon, Mar 7, 2016 at 8:01 PM, Pierre Brico <> wrote:
> Okay, I see what you mean. You use the curl_multi API to wrap an easy handle
> to avoid sharing connections between easy handles as written in curl
> documentation:
> If I follow your suggestion, I will have one multi handle per transfer and
> so one thread to manage it (waste of resources). This will prevent me to
> execute thousands transfers in parallel (currently one thread is able to
> process 100 connections).

Not quite. The suggested approach is non-blocking and asynchronous and
could therefore be used in event-loop applications.

There is no need of a separate thread for each multi and you can run
them in parallel within a single thread.
All you need is, to keep the multi handle available (e.g. by attaching
it to the user's private opaque).

BTW, please avoid top-posting, it makes it hard to follow (see
etiquette link below).
List admin:
Received on 2016-03-07