cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: is lib-curl thread-safe?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 9 Jan 2001 08:16:28 +0100 (MET)

On Mon, 8 Jan 2001, Reza Naima wrote:

> This question was probably asked at some point, but I couldn't find a
> FAQ around..

There's one at http://curl.haxx.se/docs/faq.shtml and there's one included in
every release archive...

> I was wondering, is libcurl thread-safe?

  5.1. Is libcurl thread safe?

  We have attempted to write the entire code adjusted for multi-threaded
  programs. If your system has such, curl will attempt to use threadsafe
  functions instead of non-safe ones.

  I am very interested in once and for all getting some kind of report or
  README file from those who have used libcurl in a threaded environment,
  since I haven't and I get this question more and more frequently!

I've not received any reports saying otherwise, instead I've only heard
successful stories from people doing multithreading with libcurl.

> I'de like to use it to write some port monitoring code (http, https, ftp,
> ldap) to make sure that certain sites are alive as well as doing simple
> transaction monitoring (go to page x, then page y, then page z, and make
> sure that page z has the expected results). I'm guessing that I'de
> monitor something in the order of 500 "things" at a frequency of once a
> minute and store timeing information. How "doable" is this with libcurl?

It is perfectly doable with libcurl.

> I'm guessing that I'de have to use threads or else fork off a lot of
> copies to get the throughput I need.

Well, if you need 500 things simultaneously you need quite a lot of
threads...

> If libcurl isn't the right tool for this, can anyone suggest another
> application or library that I can use to construct it?

I'm not aware of any competitors that make a lib such as libcurl, neither
free nor commercial. libwww is another library although a lot bigger and
immensly more complicated.

If anyone know of any competitors, feel free to let us know. Competition is
good.

-- 
  Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/curl-library
Received on 2001-01-09