curl-library
Re: Threaded resolver spins bug + patch
Date: Sun, 9 Aug 2009 11:01:16 -0700
This sound worth a try. It's like the UNIX approach of using a pipe to
wakeup select() from a signal handler/another thread but instead uses TCP on
localhost.
I'll try to come up with a version of the patch based on this approach.
Probably won't happen for another week though.
Thanks for the idea!
-Costa
On Sat, Aug 8, 2009 at 10:51 PM, Jamie Lokier <jamie_at_shareable.org> wrote:
> Constantine Sapuntzakis wrote:
> >
> > That's a good idea but I have a couple concerns that maybe you can
> > address.
> > I'm thinking that allocating a random TCP port might lead to random
> > failures of future programs as they are unable to allocate the port
> > they need to listen on. Especially because Windows uses ports
> > 1025-5000 as its default ports.
>
> That makes sense. You can give a port number instead, starting from
> 65535 down if you prefer, until one of them binds successfully. You
> might find that closing the listening socket after the connect frees
> up the port, too.
>
> I'm not sure if Windows allows you to bind to 127.0.0.2 and then
> connect to it, which would be another trick.
>
> > Also, would any aggressive firewalls block or pop up messages to users
> > if a TCP were used?
>
> I don't know. Because it's an internal connection within the machine
> that's less likely, but firewalls can do anything.
>
> -- Jamie
>
Received on 2009-08-09