Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vtls: make curl_global_sslset thread-safe #9016

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
Member

@jay jay commented Jun 15, 2022

.. and update some docs to explain curl_global_* is now thread-safe.

Follow-up to 23af112 which made curl_global_init/cleanup thread-safe.

Closes #xxxx

.. and update some docs to explain curl_global_* is now thread-safe.

Follow-up to 23af112 which made curl_global_init/cleanup thread-safe.

Closes #xxxx
Copy link
Contributor

@emanuele6 emanuele6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"has XYZ feature bit set" -> "has the XYZ feature bit set"

@@ -36,7 +36,11 @@ This function releases resources acquired by \fIcurl_global_init(3)\fP.
You should call \fIcurl_global_cleanup(3)\fP once for each call you make to
\fIcurl_global_init(3)\fP, after you are done using 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 feature bit set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE feature bit set
\fIcurl_version_info(3)\fP has the CURL_VERSION_THREADSAFE feature bit set

@@ -81,7 +81,11 @@ function again to try to select a different backend.
The SSL backend can be set only once. If it has already been set, a subsequent
attempt to change it will result in a \fBCURLSSLSET_TOO_LATE\fP.

\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 feature bit set
Copy link
Contributor

@emanuele6 emanuele6 Jun 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE feature bit set
\fIcurl_version_info(3)\fP has the CURL_VERSION_THREADSAFE feature bit set

Comment on lines +98 to +99
\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE feature bit set (most
platforms).
Copy link
Contributor

@emanuele6 emanuele6 Jun 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE feature bit set (most
platforms).
\fIcurl_version_info(3)\fP has the CURL_VERSION_THREADSAFE feature bit set
(most platforms).

( I moved (most on the next line together with platforms) for consistency with docs/libcurl/curl_global_cleanup.3 )

@@ -154,28 +154,31 @@ that library that describes the SSL protocol.
allocate resources (e.g. the memory for the GNU TLS tree mentioned above), so
the companion function \fIcurl_global_cleanup(3)\fP releases them.

The basic rule for constructing a program that uses libcurl is this: Call
The global constant functions are thread-safe since libcurl 7.84.0 if
\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE feature bit set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
\fIcurl_version_info(3)\fP has CURL_VERSION_THREADSAFE feature bit set
\fIcurl_version_info(3)\fP has the CURL_VERSION_THREADSAFE feature bit set

@jay jay closed this in a8a4abb Jun 16, 2022
@jay jay deleted the sslset_threadsafe branch June 16, 2022 07:23
@jay
Copy link
Member Author

jay commented Jun 16, 2022

"has XYZ feature bit set" -> "has the XYZ feature bit set"

Thanks, I landed it with that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants