Mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Context types in APR.
Date Sun, 02 May 1999 23:40:00 GMT

Ben Hyde and I have been discussing this off line a little bit, so I am
bringing this back to new-httpd.  I am going to _try_ to summarize what
was said, so if I get it wrong Ben, please correct me.

Ben's position:

We should forget about context types.  All the stuff we were going to put
in the context type really belongs in the pool structure.  This basically
means we are adding a thread pointer, state flags, and possibly other
fields later to the current Apache pools.  His argument is that the
context abstraction is unnecessary, and we are better off just adding the
fields to the current pools.

Ben also feels ALL apr types should allow users to hang their own data off
of them.

My position:

Pools are complex in Apache, I think it is better to use the current pool
structure, and add a new type, contexts, that include the pool pointer,
the thread pointer, the state flags, and user defined data.

I do not see a need to have each apr type allow the user to hang data off
of them.

Work done so far:

Please disregard the work done so far.  I have coded each apr function to
take a context, and use it to allocate from the pool.  I stopped coding
when each function was allocating from pools, because the current work is
easy to change.  I used a standard naming system, so changing all the
current contexts into pools will require running ONE(I already have the
script) script from the roo directory.  I will not be implementing any
mroe about pools until this issue is settled, because any other work will
become much more difficult to change to the desired system.  I figured
nobody would argue that apr sould be allocating from pools instead of
using malloc/free.

That is the short summary, the actual discussion is included below for
anybody who would like to read it.


View raw message