[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Allocating from a pool in cleanup

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-11-11 18:02:32 CET

Greg Hudson <ghudson@MIT.EDU> writes:

> On Mon, 2002-11-11 at 06:28, Philip Martin wrote:
> > I don't think that runs the cleanups in the ideal order. Given two
> > cleanups cleanupA and cleanupB, with cleanupA run before cleanupB,
> > then if cleanupA registers cleanupC I would expect cleanupC to run
> > before cleanupB. Each cleanup that is registered goes to the head of
> > the queue.
>
> Nothing in apr_pools.h mentions cleanup order, and I cannot think of any
> legitimate design which relies on cleanup order within a particular
> pool.

1. The documentation in apr_pools.h is far from complete :-) Try
    determining pool thread safety from the documentation, or any
    restriction on calling apr_pool_cleanup_register during cleanup.

2. Sander has already stated that the order is first in, last out
    in response to an earlier claim that the order was unspecified.

3. I cannot image a system that *doesn't* specify the order being
    useful. We rely on the ordering, to ensure that the access baton
    cleanup happens before the apr_xlate_t cleanup.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 11 18:23:48 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.