[mod_python] Re: Speaking of Output Filters....

Graham Dumpleton grahamd at dscpl.com.au
Wed Apr 12 08:26:07 EDT 2006


On 12/04/2006, at 10:25 PM, Lee Brown wrote:

> Greetings!
>
> Thanks to Graham and Daniel for the info on bucket brigades. I  
> think I've
> got my head wrapped around it now.
>
> If I'm grasping this correctly: not only can one request call the  
> filter
> multiple times, but overlapping requests may be calling the filter  
> multiple
> times.  The filter therefore needs to preserve its state in a  
> thread-safe
> way, and as far as the filter is concerned the req object is a  
> persistent,
> thread-safe place to put a buffer.
>
> If filter.read() returns '', this means you've hit the bottom of  
> the current
> bucket and it's time to update the buffer.  If filter.read returns  
> None,
> you've hit the end of the request stream and it's time to proceede  
> with the
> filter operation.
>
> If I'm still missing something, please let me know....

No, not missing anything that I can see. Actually sums it up quite well.

Graham


More information about the Mod_python mailing list