[PATCH] Make server-side copy (copy-chunk) async

Jeremy Allison jra at samba.org
Thu Mar 23 01:52:46 UTC 2017


On Wed, Mar 22, 2017 at 10:47:59PM +0100, Ralph Böhme wrote:
> On Wed, Mar 22, 2017 at 02:44:48PM -0700, Jeremy Allison wrote:
> 
> > What about a tevent useage where a containing
> > tevent_req issues a set of multiple async
> > sub requests backed by underlying pthreads,
> > or a it's using a tevent_queue ? It doesn't
> > help cancelling them as there's more than
> > one subreq we're waiting on.
> 
> Sure, for the more complicated cases you need a full fledged cancel
> functions. tevent_req_set_cancel_forwarding() is supposed to be used from
> function that would otherwise don't need a cancel function at all.
> 
> > Convince me ! :-) :-).
> 
> With tevent_req_set_cancel_forwarding() it's one line of code instead of, well,
> 10? I'm using it in four places, makes 40 lines less boilerplate code. Smaller
> diff wins! :)
> 
> I personally just *like* this API, but I guess I'm biased. :)

Fair enough - it is a convenience that eliminates
quite a bit of boilerplate code.

I guess if Metze and Volker are OK with it I'll learn
to live with it :-).



More information about the samba-technical mailing list