apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: freelists: a slightly different approach
Date Wed, 26 Sep 2001 16:00:13 GMT
On Wednesday 26 September 2001 08:23 am, Cliff Woolley wrote:
> On Wed, 26 Sep 2001, Ryan Bloom wrote:
> > Because this can all be easily accomplished with the connection ID
> > field that is already in the conn_rec.
>
> Well, then how's about we let Apache do the static array of
> apr_bucket_freelist*'s and use the connection ID to index into that?
> That way we keep the bucket API nice and clean and flexible and don't have
> to add another field to the conn_rec either.  I can definitely live with
> that.  What I don't like is the API design concept of "you pass me some
> index over which I have no control into some array that is otherwise
> totally internal to me."

That's fine.  Of course, you could just as easily pass an ID to the bucket
API.  Then, you keep the abstraction, because the bucket API just ends up
accepting an ID to the create function.  That ID ends up being an integer,
but conceptually it is just a unique identifier.  You could also create a simple
function to return a unique ID to the caller, so that if the program didn't have
their own ID, we could provide one.

Ryan


______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message