apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <s.stri...@striker.nl>
Subject Re: Changing the order of cleanup for some core objects
Date Mon, 21 Jul 2008 12:11:02 GMT
On Mon, Jul 21, 2008 at 1:12 PM, Mladen Turk <mturk@apache.org> wrote:
> Joe Orton wrote:
>> In the model where you have S allocated out of P, let's presume we also
>> have a subpool Q.
>> If for some reason specific to the design of your application, you need S
>> to be closed before the destruction of Q, you can register a cleanup against
>> Q which does calls apr_socket_close(S).  That will give defined behaviour.
> That's fine, but then if I explicitly close the S I have to deregister
> the cleanup for Q, close the S, and then register the cleanup for Q
> again. That's how its done now in multiple places where APR is used.

If these places happen to be something specific you can point at,
could you please?

What I'm reading in your response is that you're trying to do both
implicit *and* explicit tear down/clean up?  Why?

> I need additional pool and additional cleanup for the exact behavior that
> pre_cleanup does.

The behaviour being: a cleanup being run prior to all subpools of a
certain pool being

The number of use cases for that I perceive as quite limited.  Correct
me if I'm wrong.

> Also this pool has to be the 'last'
> one registered, so adding any dependent child pools to P requires
> deregister/register of Q so its assured it's callback is run first.
>> The pre_cleanup stuff seems to be entirely redundant in this regard.  I
>> don't understand the motivation for it in the first place, to be honest.
> See above.

I wish I could say it's now all clear to me, but it isn't :(.



View raw message