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

Re: [PATCH] Re: svn_utf_initialize and pool cleanup

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-09-09 21:40:16 CEST

On Thu, 2004-09-09 at 14:53, Peter N. Lundblad wrote:
> > It should be fine to create a pool in svn_cmdline_initialize. A program
> > dynamically loading and unloading the svn libraries won't use that
> > function.
> >
> Goodi point. Is guaranteed somewhere or just a reasonable assuptiion?

I think it's a reasonable assumption given what that function does.

> Did you look at the patch in itself?

Whoops, I meant to.

It took me a while to figure out why we need a private subpool (it's
because we need to make allocations in that subpool in order to create
new handles, and allocations within a pool aren't thread-safe). You
might make the comment a little more verbose.

+ /* If we are called from inside a pool cleanup handler, the just created
+ xlate handle will be closed when that handler returns by a newly
+ registered cleanup handler, however, the handle is still cached by us.

I don't understand this. We allocate the xlate handle in the pool
created by svn_utf_initialize(), right? And presumably *that* pool has
no cleanup handlers which invoke translation functions, since we own the
pool. So why would the cleanup handler fire off right away?

The patch looks fine otherwise.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 9 21:40:34 2004

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.