apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Changing the order of cleanup for some core objects
Date Wed, 23 Jul 2008 14:22:27 GMT
Joe Orton wrote:
> 
> To be clear, I am not trying to argue that this problem can be easily 
> fixed given the constraints of the current reslist API.  But the APR 
> pools design has lasted essentially intact for over 10 years; I will 
> continue to be concerned about any line of argument which goes:
> 
> 1. we designed this API, shipped it, woo
> 2. oh dear, seems the API doesn't really work well with APR pools
> 3. hmmm, but we can't change the API now since it's shipped
> 4. so we need to change APR pools!
> 
> Obviously, however much you change APR pools, people will still be able 
> to follow this line of argument.  So we need to differentiate between 
> merely being at step (2) of that road to nowhere and finding a case for 
> a generally useful enhancement to the pools API.
>

That would be mine concern as well if pool API was changed.
It wasn't changed a bit except adding the possibility to have
pre_cleanup that behaves like:

apr_pool_create(&s, pool)
apr_pool_cleanup_register(s, foo, cleanup)
...
apr_pool_create(&bar, pool)
/* Always make sure it's executed first */
apr_pool_cleanup_kill(s, foo, cleanup)
apr_pool_cleanup_register(s, foo, cleanup)
...

is actually the:
apr_pool_pre_cleanup_register(pool, foo, cleanup)

Without a need to create an extra pool and making sure
it's a last one. Nothing more.

Regards
-- 
^(TM)

Mime
View raw message