-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tutorial: clarify the handle sharing when treaded
Previously there was wording that made people uncertain of the exact rules. Feedback by: Julien Royer and Georg Lippitsch URL: http://curl.haxx.se/mail/lib-2011-09/0357.html
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
.\" * | (__| |_| | _ <| |___ | ||
.\" * \___|\___/|_| \_\_____| | ||
.\" * | ||
.\" * Copyright (C) 1998 - 2010, Daniel Stenberg, <[email protected]>, et al. | ||
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <[email protected]>, et al. | ||
.\" * | ||
.\" * This software is licensed as described in the file COPYING, which | ||
.\" * you should have received as part of this distribution. The terms | ||
|
@@ -249,9 +249,11 @@ complication for you. Given simply the URL to a file, libcurl will take care | |
of all the details needed to get the file moved from one machine to another. | ||
|
||
.SH "Multi-threading Issues" | ||
The first basic rule is that you must \fBnever\fP share a libcurl handle (be | ||
it easy or multi or whatever) between multiple threads. Only use one handle in | ||
one thread at a time. | ||
The first basic rule is that you must \fBnever\fP simultaneously share a | ||
libcurl handle (be it easy or multi or whatever) between multiple | ||
threads. Only use one handle in one thread at any time. You can pass the | ||
handles around among threads, but you must never use a single handle from more | ||
than one thread at any given time. | ||
|
||
libcurl is completely thread safe, except for two issues: signals and SSL/TLS | ||
handlers. Signals are used for timing out name resolves (during DNS lookup) - | ||
|