Re: async-calls squid3/src comm.cc,1.81.4.16,1.81.4.17

From: Tsantilas Christos <chtsanti@dont-contact.us>
Date: Mon, 07 Jan 2008 23:59:27 +0200

The problem was different:

With classic comm code of squid3 when the comm_close for a fd called then:
 1) fd marked as closing, read and write handlers called with
COMM_ERR_CLOSING
 2) comm_close handlers called
 3) the fd closed and the fdc_table[fd] initialized.

Using async calls (current code) the above become:
 1) fd marked as closing, read and write handlers with COMM_ERR_CLOSING
parameter scheduled for execution
 2) comm_close handlers scheduled for execution
 3) closing fd and initializing the fdc_table[fd] operations scheduled
for execution

And after some time:
 - read/write handlers called with COMM_ERR_CLOSING
 - comm_close handlers called
 - The fd closed and fdc_table[fd] initialized.

If the fd closed before the comm_close handlers executed bad thinks
happens.....

Henrik Nordström wrote:
>
> And why is this needed? The sendComplete callback should be invalidated
> if the HTTP connection state is no longer there.
>
> Adding this reshedule adds a noticeable overhead an delay, plus makes
> tracing of the code flow more difficult.

The hope is that we are gaining in stability and less complex code
in upper levels.
Received on Mon Jan 07 2008 - 14:59:43 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST