cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: llist->next off by one

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 13 Nov 2003 15:17:35 +0100 (CET)

On Thu, 13 Nov 2003, Giuseppe Attardi wrote:

> Yes, I do use a global cache: I thought that using ARES this had become
> thread safe.

Aha. No, the global cache is still global and not safe to share between
threads. Ares makes name resolves non-blocking which makes the multi interface
a lot more responsive during name lookups.

> However I am using a multihandle, so I would like indeed the cache to
> survive the easy_handle and to be shared among the handles in a
> multi_handle.

Each multi handle is supposed to have its own cache setup and all easy handles
added to that multi handle use that single cache. Thread-safe. Without you
having to do anything! ;-)

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
 [[ Do not post private mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
Received on 2003-11-13