cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Threaded resolver spins bug + patch

From: Constantine Sapuntzakis <csapuntz_at_gmail.com>
Date: Fri, 14 Aug 2009 07:36:14 -0700

> 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.
>

After some more research, it seems that polling is the way to go (for now).
Here's why:

Some firewalls block the local TCP socketpair trick according to a recent
check in to libevent (check-in comment mentions Kaspersky).

QueueUserApc is not reliable as it will wake the first interruptible call in
the thread which is not necessarily WSAWaitForMultiple... Better to use an
event variable.

Exposing Windows event variables out of the curl API is too radical a change
- it would require a completely new set of APIs that are Windows only. It
feels like too large a scale change to support 1 type of resolver.

As a result, I think the polling with sleeps is the best way to go. I will
clean up the patch I have above and submit it again early next week.

Best,
-Costa
Received on 2009-08-14