curl / Mailing Lists / curl-library / Single Mail


Re: Fwd: Sharing connection pool amongst different handles

From: Daniel Stenberg <>
Date: Thu, 2 Nov 2017 16:24:59 +0100 (CET)

On Fri, 20 Oct 2017, Attila Nagy via curl-library wrote:

> A lot of HTTP clients implement this (shared connection pool between
> threads/workers/handles), so I think it would be great if curl could also
> support this.

I've pushed my initial work on this on github:

This change lets you specify that a share object should hold the connection
cache, and you can then specify for each easy handle that they should use that
share object and thus that connection cache. If done from multiple threads,
lock and unlock mutex callbacks need to be set and used.

I'm interested in feedback as well as reports on how it actually works. I have
not written any tests for the test suite or any docs for this feature yet and
I'm sure there are a few glitches left to fix before we deem it worthy for

Received on 2017-11-02