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

Re: permissions (and other) problems

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-09-12 21:46:48 CEST

Branko Čibej wrote:
> mark benedetto king wrote:
>
>> On Thu, Sep 12, 2002 at 10:09:49AM -0400, Garrett Rooney wrote:
>>
>>> To provide a means for the client application to indicate that it
>>> wants the library to stop whatever it was doing and clean up.
>>>
>>
>> Yes, but then you need to check for the cancellation every so often,
>> which can be painful.
>>
>> Also, if the application is actually blocked on a long-running operation
>> (maybe the database is already wedged, for example), this approach won't
>> work. Maybe BDB provides some asynchronous accessors...
>>
> Nope.
>
> However, I think I we already have a perfect hook where we can check for
> cancellation. It's called SVN_ERR. Just introduce a new error code,
> SVN_CANCELED, and have the SVN_ERR macro check for cancellation (a
> global var) and return an svn_error_t with that code,
>
> The command-line client would create a SIGINT handler that set that var,
> a GUI client would do something else.

I like this idea.

The client calls some function (svn_set_cancelation_handler() ?) which
sets the function to be called by SVN_ERR(). then SVN_ERR() can call it
(if it's been set) and if so, it returns the error.

We can't just have a global variable, it's got to be something that can
be controlled by the client application, but other than that i really
like this idea.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 12 21:47: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.