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: CURLSHOPT_LOCKFUNC callback requirements.

From: Daniel Stenberg via curl-library <>
Date: Tue, 4 Jun 2019 20:21:10 +0200 (CEST)

On Tue, 4 Jun 2019, Carlos ORyan via curl-library wrote:

> I guess the bottom line is: should I use different locks for different kinds
> of data in the same CURLSH* handle?

Yes. Each kind should have its own lock since they will be locked/unlocked
totally independently of each other.

> And if so, may I suggest that the documentation could be improved to say:

> ... When using multiple kinds of data in a CURLSH you must make sure that
>> your callback uses a different lock for each kind of data. With that
>> constraint in mind, use a single lock a time for each CURLSH and kind of
>> data.

Thanks. How about this further edited version?

  The data argument tells what kind of data libcurl wants to lock. Make
  sure that the callback uses a different lock for each kind of data.

  / | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
Received on 2019-06-04