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

Re: interrupting operations

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-10-17 17:51:34 CEST

Ich Selbst wrote:
> Hi,
>
> is it possible to stop SubVersion commands while they
> are running? Like setting a boolean to false and the
> operation would then exit without completing.
> I'm asking because Clients usually do (and also should)
> provide a 'Cancel' button for operations which take some
> time and just kill the thread would lead to memory leaks
> (already tried that). Just imagine a user accidentally specifies
> to get ALL log entries instead of just the last 10 - that
> could lead to a veeeery long operation when there's a slow
> connection and many log entries...

currently no.

i had a patch that provided such a facility, but there was a resounding
lack of support for it because of questions about how well it would
perform with multithreaded clients. (well, some people objected to it,
some didn't, but there didn't seem to be a majority either way so i
didn't pursue it any further)

doing this in such a way that would work well with multithreaded clients
would require adding a context argument that gets passed down with each
call and inserting calls to a user supplied callback that checks to see
if it should back out in various places, or using a global
callback/context and inserting the calling of the callback into the
SVN_ERR macro (that's what mine did).

if people are OK with the global callback/context technique (which means
that multithreaded clients are required to use thread specific storage
inside their callback in order to support multiple cancelable svn
actions in separate threads), i'd be happy to dig up the patches and
make them work again, but i don't have the time or the energy to do it
the other way.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 17 17:52:23 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.