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

Re: [DESIGN] Stacked resources ownership model?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-12-15 21:33:24 CET

On Thu, 2005-12-15 at 21:10 +0100, Erik Huelsmann wrote:
> Later this week, I'm working on creating an implementation of
> svn_client_cat2 which doesn't create a temp file, but directly
> translates its input into the output stream. To do that, it needs to
> stack a translating stream onto the 'out' stream which is passed as a
> parameter. The problem here is that I can't do that: svn_client_cat2
> doesn't own the 'out' stream, but does own the translated stream. If
> it passes the out stream as a parameter to the translated stream, that
> will be owned by that stream and hence svn_client_cat2 will have
> claimed ownership of that stream.

I thought about that kind of situation, but decided it shouldn't be a
problem as long as svn_client_cat2 doesn't close the stacked stream.
(Although that raises another issue: apr files register pool cleanups to
close the file, but streams do not do the same thing to close the
stream. If we ever change that, then it will be impossible to avoid
closing the stacked stream.)

One of the options you didn't list was abandoning the ownership model
for stacked streams and making them all interface-only, like
svn_stream_from_aprfile is.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 15 21:35:10 2005

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.