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

[PATCH] Re: svn_utf_initialize and pool cleanup

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-09-08 23:37:42 CEST

On Mon, 6 Sep 2004, Greg Hudson wrote:

> So I do think we want to be passing a pool argument to
> svn_utf_initialize(), with the proviso that no Subversion functions
> may be in progress when this pool is cleaned up. The pool cleanup
> handler can reset the static data so that we go back to per-pool xlate
> handles.
>
> Speaking of which, it looks like Peter's code doesn't use per-pool
> xlate handles when svn_utf_initialize() is called, which means his
> change makes translation much *slower* if the initializer isn't
> called. That doesn't seem acceptable.
>
The attached tries to fix the above problems. It is getting complex - I
won't commit before I get a review or two:-)

BTW, I ran into an interesting bug that we must have had in the old code
without it showing up. When we create and cache an xlate handle from
inside a pool cleanup handler, the handle will be closed immediately after
the return of that cleanup and the cache will be invalid. I think we are
lucky this hasn't manifested itself, but now when we have a global cache
that is destroyed in a pool cleanup, it showed up...

Also, I had to move the call of svn_Utf_initialize out of
svn_cmdline_initialize, since we don't have a pool there. I haven't added
it to svnserve, since it creates detached threads and I don't know how to
guarantee that they are done before the cleanup of the pool, which is a
requirement.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Wed Sep 8 23:23:40 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.