cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: an idea of a new function

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 19 Dec 2002 16:05:22 +0100 (MET)

On Thu, 19 Dec 2002, Jean-Philippe Barrette-LaPierre wrote:

> I saw that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread safe...

Correct, and this is mentioned in the man page.

> if this is the only thing that is not thread safe

AFAIK, it is, at least if you're using CURLOPT_NOSIGNAL.

> we could make an option to set a callback and a data, to lock and unlock
> the global cache, what do you think?

Well, I think this is a both good and bad idea.

Good: because this is in line with what is already planned for our "sharing"
mechanism as mentioned here: http://curl.haxx.se/dev/sharing.txt, in which an
application can decide what data different curl handles can/should share
between them and how to do the locking.

Bad: because it should be implemented using the above mentioned system and
not using a new separate API that will not fit with the above mentioned
system.

I'm not saying that the details need to be exactly as mentioned in the above
URL, but something along those lines seem like the smartest approach to me.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now!  Before the Holidays pass you by.
T H I N K G E E K . C O M      http://www.thinkgeek.com/sf/
Received on 2002-12-19