cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: POSIX threaded DNS resolver - first experiences

From: Constantine Sapuntzakis <csapuntz_at_gmail.com>
Date: Thu, 22 Apr 2010 10:29:20 -0700

> I am about to experimentally switch libcurl in rawhide Fedora to use
> POSIX threaded DNS resolver.  I ugly hacked configure.ac to enable this
> feature.  That's the first patch.  Then I had problem with permanently
> failing test536.  The failure seems to be caused by insufficiently

Thanks for working on this!

The problem is with the test.

test536 doesn't handle maxfd == -1, which is a valid response from
curl_multi_fdset when using the threaded resolver.

I did a quick test on Mac OS X and changed the code to do the following:

  if (maxfd < 0) {
     sleep(1);
     continue;
  }

Unfortunately, this code won't compile on Windows (no sleep call).

BTW, ares has better abort semantics than the threaded resolver.
curl_*_cleanup will hang in the threaded DNS resolver until the
resolver thread exits.

-Costa
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-04-22