cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl, threading and gethostbyname

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 Aug 2010 00:13:25 +0200 (CEST)

On Thu, 26 Aug 2010, Constantine Sapuntzakis wrote:

> Curl keeps an internal DNS cache that's global. I'm guessing you need to
> register mutex callbacks (see CURLSHOPT_LOCKFUNC and CURLSHOPT_UNLOCKFUNC).

No, it's local to the easy/multi handle unless you explictily made it global -
and if you made it global the lock functions won't save you.

The proper way to share the DNS cache is by using the share interface as you
describe.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-27