httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <>
Subject Re: [PATCH] Filter registration.
Date Tue, 25 Jul 2000 04:18:27 GMT
Greg Stein <> wrote:
>1) what is the lifetime of an ap_bucket_t (and/or a list/brigade of them)
>   specifically: are they self-managed or do they die when the filter
>   function returns? this also involves things like the use of malloc()

I think the lifetime of a bucket should be independent of the request
handler function because otherwise you lose a lot of advantages of the
abstraction. I wouldn't consider it to be a properly first-class data
type if you can't return it from a function.

Being able to control the livetime of a bucket brigade independently
of the flow of execution is crucial for allowing advanced stuff like
cacheing and event-driven IO to benefit from the bucket brigade
abstraction. I think it is short-sighted to limit it to nothing more
than what we need now.

>2) do we include a tail pointer? is this tail pointer in a separate
>   structure or is it part of the actual bucket somehow? (e.g. the first
>   bucket's prev pointer refers to the tail)

IMO it is best to keep the distinction between the list (i.e. the bucket
brigade, where the head and tail pointers live etc.) and the list
elements. I also think it would be best to use the standard BSD list
macros rather than waste time implementing lists all over again.

436 mysterious mound on your mantelpiece

View raw message