cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] patch series for improved multi interface

From: Constantine Sapuntzakis <csapuntz_at_gmail.com>
Date: Mon, 16 Aug 2010 08:56:37 -0700

> On Tue, 10 Aug 2010, Daniel Stenberg wrote:
> These four commits have now been pushed to the git master branch.
>
> Please have a go and help me polish this!

Thanks for this! The new timeout behavior is better than the old behavior.

Still worried about Curl_expire. Curl_expire(, 0); cancels all the
pending timeouts.
This is dangerous as two parts of the code that use timeouts for
different reasons
(e.g. one for polling and another for protocol timeout) could clobber
each other.
Do you share this concern or is the risk false?

Here is an idea:

1) add a struct timeout

2) Change Curl_expire to take 3 args. The new sig would be:

void Curl_expire(struct SessionHandle *, struct timeout *, long milli);

This way, for example, the thread DNS resolver could embed a different
struct timeout in its data structures than the standard curl handle.
And Curl_expire( , , 0) would only cancel the specified timeout.

Thoughts?

-Costa
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-16