cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: download thread hung in poll()

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 10 Nov 2011 10:22:05 +0100 (CET)

On Tue, 8 Nov 2011, Alex Loukissas wrote:

>> Doesn't this simply "hang" for 1000 milliseconds and then it continues?
>
> No, it hangs for a couple minutes.

If a poll() call with a 1000ms second timeout argument can spend more than
1000 milliseconds until it returns, then I'd suggest there's a problem in
poll(). Don't you agree?

> It appears that what causes this issue is that both threads are trying to
> get the same URI at the same time and one starves the other.

Threads using independent libcurl handles have nothing shared and nothing in
libcurl will block any other libcurl-using thread.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-10