Skip to content

Commit

Permalink
FAQ: expand the thread-safe section
Browse files Browse the repository at this point in the history
... with a mention of *NOSIGNAL, based on talk in bug #1386
  • Loading branch information
bagder committed Jul 10, 2014
1 parent 1cef8f0 commit 6273b23
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/FAQ
Expand Up @@ -1099,6 +1099,12 @@ FAQ
your system has such. Note that you must never share the same handle in
multiple threads.

libcurl's implementation of timeouts might use signals (depending on what it
was built to use for name resolving), and signal handling is generally not
thread-safe. Multi-threaded Applicationss that call libcurl from different
threads (on different handles) might want to use CURLOPT_NOSIGNAL, e.g.:

curl_easy_setopt(handle, CURLOPT_NOSIGNAL, true);

If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
need to provide one or two locking functions:
Expand Down

0 comments on commit 6273b23

Please sign in to comment.