[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: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-11-11 17:21:31 CET

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.

(On the other hand, this is easy to implement:

  while (p->cleanups)
    {
      cleanup = p->cleanups;
      p->cleanups = cleanup->next;
      cleanup->plain_cleanup_fn(cleanup->data);
    }
)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 11 17:22:21 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.