]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_global_init.3: this is now (usually) thread-safe
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Jun 2022 15:12:52 +0000 (17:12 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 8 Jun 2022 06:50:15 +0000 (08:50 +0200)
Follow-up to 23af112f5556

Closes #8972

docs/libcurl/curl_global_init.3

index 8709a6345574085b39dc8bc4007ad5c42148828d..ce0b1dcea704fc8fd22ed07d7616ef6d02581bc9 100644 (file)
@@ -44,16 +44,18 @@ In normal operation, you must specify CURL_GLOBAL_ALL. Do not use any other
 value unless you are familiar with it and mean to control internal operations
 of libcurl.
 
-\fBThis function is not thread safe.\fP You must not call it when any other
+This function is thread-safe since libcurl 7.84.0 if
+\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE_INIT feature bit set
+(most platforms).
+
+If this is not thread-safe, you must not call this function when any other
 thread in the program (i.e. a thread sharing the same memory) is running.
 This does not just mean no other thread that is using libcurl. Because
 \fIcurl_global_init(3)\fP calls functions of other libraries that are
 similarly thread unsafe, it could conflict with any other thread that uses
-these other libraries.
-
-If you are initializing libcurl from a Windows DLL you should not initialize it
-from DllMain or a static initializer because Windows holds the loader lock
-during that time and it could cause a deadlock.
+these other libraries. If you are initializing libcurl from a Windows DLL you
+should not initialize it from DllMain or a static initializer because Windows
+holds the loader lock during that time and it could cause a deadlock.
 
 See the description in \fIlibcurl(3)\fP of global environment requirements for
 details of how to use this function.