Garrett Rooney wrote:
> Branko Čibej wrote:
>
>> 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.
Cool. I agree a function is better (although slower, but let's not
optimize without perf measurements). I'll be away all week from Saturday
(sailing again, whee), and I fully expect to see this mechanism in the
code when I get back. Hint, hint! :-)
--
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
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:56:17 2002