curl-library
Re: Is it safe not to perform curl_global_init()?
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 26 Mar 2009 09:18:32 +0100 (CET)
Date: Thu, 26 Mar 2009 09:18:32 +0100 (CET)
On Thu, 26 Mar 2009, centrio_at_gmail.com wrote:
>> If you don't call curl_global_init() on your own, libcurl will do it for
>> you. And if you do that in a thread, then you risk that more than one
>> thread calls it at the same time and then of course all sorts of problems
>> can arise as it is not thread-safe.
>
> Do you mean to say, the current code, which does not use global_init() is
> also not thread safe?
curl_global_init() is not thread safe.
Thus if you don't make sure it gets called in a safe way, you're not doing it
in a ... eh, safe way.
-- / daniel.haxx.seReceived on 2009-03-26