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: Carlos ORyan via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 4 Jun 2019 14:22:52 -0400

Hi,

On Tue, Jun 4, 2019 at 2:21 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> 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.

Thanks for the quick response.

>
> > 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.

That sounds great, thank you again.

>
> --
>
> / daniel.haxx.se | Get the best commercial curl support there is - from me
> | Private help, bug fixes, support, ports, new features
> | https://www.wolfssl.com/contact/

-- 
Carlos O'Ryan
Cloud C++ Client Libraries
#include <cute.quote> // TODO(coryan@) actually pick a quote
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2019-06-04