Junio C Hamano wrote: > Joey Hess <joey@xxxxxxxxxxx> writes: > > > .... And other code in git uses an async feeder similarly, > > see for example convert.c's apply_filter(). So I think this is ok..? > > Yeah, I didn't look at your patch (sorry) but if it uses async like the > filtering codepath does, it should be perfectly fine (please forget about > the select(2) based kludge I alluded to; the async interface is the right > thing to use here). No problem, I was surprised to be getting responses at all over the holidays. :) Then async also seems the right thing to use for the hook refactoring. A caller can provide two function pointers; a feeder function that is called async, and a reader that is *not* called async (which would allow it to modify program state), and the refactored hook function handles running the hook(s) and connecting them to the feeder and/or reader. -- see shy jo
Attachment:
signature.asc
Description: Digital signature