cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Curl from multiple threads and callback functions

From: Michal Marek <mmarek_at_suse.cz>
Date: Wed, 02 Jan 2008 10:01:26 +0100

Andreas Volz napsal(a):
> I read that curl is thread save, So does curl only call the callback
> once the same time if I use curl from multiple threads? Or do I need to
> protect the callback with a mutex?

Depends on what your callback actually does. If you manipulate global
data, you need to protect them. If you only touch the per-callback data
set via CURLOPT_WRITEDATA, then you're safe.

hth,
Michal
Received on 2008-01-02

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET