On Thu, 17 Dec 2009, Pinakin Mevawala wrote:

curl_global_init() is documented not to be thread-safe. If you use it
in more than one thread, you're on your own.

What if we our self provide synchronization between two threads for all the CURL code starting from curl_global_init(ALL) to curl_global_cleanup(). Will that be ok or as per the documentation, we should call curl_global_init only once.

Then I think you'll be fairly safe against races, but I think you may still risk memory leaks etc (frankly I can't remember off the top of my head if this is still true). Those functions are node designed to be called multiple times.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to