cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Jamie Lokier <jamie_at_shareable.org>
Date: Mon, 7 Sep 2009 13:33:07 +0100

Daniel Stenberg wrote:
> On Mon, 7 Sep 2009, Jamie Lokier wrote:
>
> >>
> >>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?
> >
> >I would think you have 3000 open file descriptors and a DNS implementation
> >which breaks because it's using select() and FD_SETSIZE == 256 in the DNS
> >code to worry about first :-)
>
> Ah yes, on windows the defalt number of concurrent open sockets is usually
> a lot less than other systems too (still 64?) so I bet this would break
> long before 1000.

From what I've read, you can have more sockets open, but select() and
the other Windows wait-on-event functions are limited to 64 sockets.

-- Jamie
Received on 2009-09-07