From: Jay Satiro Date: Mon, 30 Jun 2025 05:53:43 +0000 (-0400) Subject: CURLSHOPT_SHARE.md: mention multi-threading requires callbacks X-Git-Tag: curl-8_15_0~116 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd9d791651b54778a4308fd4bad7da2fda11059e;p=thirdparty%2Fcurl.git CURLSHOPT_SHARE.md: mention multi-threading requires callbacks - Explain that if data is shared in multiple threads then the user must set mutex callbacks. Reported-by: afengsoft@users.noreply.github.com Fixes https://github.com/curl/curl/issues/17774 Closes https://github.com/curl/curl/pull/17782 --- diff --git a/docs/libcurl/opts/CURLSHOPT_SHARE.md b/docs/libcurl/opts/CURLSHOPT_SHARE.md index d4e3fc4dfb..4171430a79 100644 --- a/docs/libcurl/opts/CURLSHOPT_SHARE.md +++ b/docs/libcurl/opts/CURLSHOPT_SHARE.md @@ -35,6 +35,9 @@ CURLSHOPT_SHARE(3) multiple times with different data arguments to have the share object share multiple types of data. Unset a type again by setting CURLSHOPT_UNSHARE(3). +If any of the data is to be shared in multiple threads then mutex callbacks +must be set as well. See CURLSHOPT_LOCKFUNC(3) and CURLSHOPT_UNLOCKFUNC(3). + ## CURL_LOCK_DATA_COOKIE Cookie data is shared across the easy handles using this shared object. Note