Cancelling network operations

Stefan Küng tortoisesvn at
Thu Apr 22 12:41:51 EDT 2010

On 22.04.2010 18:33, Bert Huijben wrote:

> The only problem with that is that Subversion handles this the other
> way around:
> It calls into a user provided function that then checks for
> conditions on when it should cancel. (See my original proposal)
> So more like:
> typedef int (* ne_cancel_func_t)(void *userdata);
> void ne_session_set_cancel_callback(ne_session *sess,
> ne_cancel_func_t cancel_func, void *userdata)
> And neon should then call into that function, instead of checking the
> volatile variable itself.
> Subversion can then map this to call its svn_cancel_func_t, which in
> its turn is provided by the library user.

Yes, that would be much better.

> (The default implementation in 'svn' puts up a signal handler on the
> ^C signal, which handles it exactly like you suggested)

But don't forget that UI clients don't have such signal handlers, so the 
cancel callback is all they can use.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\

More information about the neon mailing list