cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Fix for known bug #64 / simplification of hostthre.c

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 7 Sep 2009 08:52:09 +0200 (CEST)

On Sun, 6 Sep 2009, Constantine Sapuntzakis wrote:

> This patch gets rid of most of the synchronization and just waits for the
> resolver thread to exit. The benefit is simplicity.
>
> This patch does not really support timeout of async name lookups -- the
> patch will eventually wait for the thread to exit in
> Curl_destroy_thread_data if it hasn't earlier.

Lots of people and apps use timeouts so not supporting those is a real
problem.

So what happens if we have a time-out of 1ms, a very slow DNS that takes a
full second to respond and we ask for a file on such a host 1000 times in a
loop? Will we then have 1000 threads waiting to die?

-- 
  / daniel.haxx.se
Received on 2009-09-07