From cd9d791651b54778a4308fd4bad7da2fda11059e Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Mon, 30 Jun 2025 01:53:43 -0400 Subject: [PATCH] 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 --- docs/libcurl/opts/CURLSHOPT_SHARE.md | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.47.2