cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl version + multi threading

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 26 Mar 2002 09:45:36 +0100 (MET)

On Tue, 26 Mar 2002, Girish Dharmapurikar wrote:

> One more question regarding thread safe behavour in case of permanent
> connection. If I want to use the same curl_handle for different threads in
> my program, apparently, it seems that I have to have some queue mechanism
> implemented in my program for using that curl_handle. i.e I can't use this
> curl_handle from many programs at a time. How can we call this behaviour of
> doing one thing at a time as a thread safe?

Because if you use one handle in each thread, all threads can run and perform
independently of the others. That is thread safe behavior.

If you feel a need to share the same handle in multiple threads, then please
join the effort to bring mutexes and thread-sharable data to libcurl. Noel
Byron is doing some serious work in that area, as can be read in the mails
recently posted, that are archived from here:

        http://curl.haxx.se/mail/lib-2002-03/0102.html

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-03-26