cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Threads and init and cleanup

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 22 May 2003 16:28:21 +0200 (CEST)

On Wed, 21 May 2003, Matt Veenstra wrote:

> If I am using curl_easy_perform() in a thread do I need to call
> curl_easy_init() and curl_easy_cleanup() each time a thread is created?
> Or can the application initialize and cleanup and the threads share the
> returned CURL pointer.

You can pass around and use the CURL pointer as you like, as long as you are
very careful to only use one CURL pointer in one thread at a time.

> So, far everything is quite simple and seems to work quite well. After
> having written this same code on 3 unique platforms and with 5 different
> API's. libcurl is the easiest to implement.

:-)

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
Received on 2003-05-22