curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Concurrency and send/recv

From: Daniel Stenberg via curl-library <>
Date: Sat, 13 Mar 2021 13:31:28 +0100 (CET)

On Sat, 13 Mar 2021, Ray Satiro via curl-library wrote:

> curl handles can't be used from multiple threads at the same time [1] and
> because of that I'm pretty sure it's not possible. Note cached connections
> can be shared between threads (but there is a concurrency bug in that).
> Daniel will have to elaborate on the intentions here but I'm pretty sure
> based on the way it's documented [2] that it's not possible.

The same rules still apply: a (handle and) connection can only be used by a
single thread at any given time.

The shared connection pool via the share interface would allow different
threads to share a single pool (for unused idle onnections), but that requires
more work to be properly functional. I don't see that getting fixed in the
short term.

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2021-03-13