Re: [PATCH] Bug 3281

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 02 Sep 2011 15:25:02 -0600

On 09/02/2011 12:29 AM, Amos Jeffries wrote:
> On 02/09/11 04:55, Alex Rousskov wrote:
>>
>> I am not strongly against this, but it would be more elegant and may be
>> more efficient to let the about-to-timeout connections to be reused
>> instead. This can be safely done, for example, by canceling the pending
>> timeout notification callback in the connection giving code.
>
> Cancelling calls here would mean re-writing IdleConnList to store those
> calls to be cancelled.

Correct.

> This patch would still be needed after all that change but would cancel
> and return true instead of just returning false.

I agree that isAvailable() will still be needed. I disagree on the other
two counts:

* The timeout canceling code should be in the "give this connection to
the caller" code such as pop(), not in isAvailable().

* There will be no timeout notification pending check in isAvailable()
because we do not care if such check is pending if we can cancel it.

Cheers,

Alex.
Received on Fri Sep 02 2011 - 21:25:23 MDT

This archive was generated by hypermail 2.2.0 : Sat Sep 03 2011 - 12:00:03 MDT