cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Threaded resolver spins bug + patch

From: Jamie Lokier <jamie_at_shareable.org>
Date: Tue, 11 Aug 2009 17:30:56 +0100

Daniel Stenberg wrote:
> On Tue, 11 Aug 2009, Jamie Lokier wrote:
>
> >>I must admit I'm a looser for portable code and solutions in general, but
> >>I want to stress that I don't want to see this threaded approach done in
> >>other operating systems. I want to push people not happy with the default
> >>resolves go the c-ares route instead, and if that isn't good enough we
> >>fix c-ares to become good enough...
> >
> >Why would c-ares be fine for other operating systems but not good enough
> >for Windows?
>
> Just some bad wording on my behalf. c-ares already works fine on Windows
> too, but we already have the threaded resolver for windows and thus I think
> we can keep it. I just think that the correct evolution is towards more
> c-ares, not more threading.

Also, many unix resolvers are not thread-safe, and some which are
thread-safe just take a process-wide lock.

And even the ones which are thread-safe and concurrent will leak file
descriptors when you call exec*() in another thread.

-- Jamie
Received on 2009-08-11