Subject: Re: [PATCH 1/4] run-command: add pipe_output to run_processes_parallel

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 28 Sep 2022 07:40:02 +0200

On Tue, Sep 27 2022, Calvin Wan wrote:

>> Okey, if it's not blocking a re-submission of yours then I'll definitely
>> wait until after the RC to submit the above, at least, but if you'd like
>> it earlier...
>
> I just tested a solution where I add pipe_output_fn to
> parallel_processes instead of having it as a variable. Not only does
> it work but it also solves my unbounded output problem, so this is
> no longer blocked resubmission.

You mean the internal "struct parallel_processes"? How do you get the
parameter there, presumably by passing it to
run_processes_parallel{,_tr2}() as a new parameter?

The reason for why the "ungroup" wasn't added as a parameter at the time
was to avoid the churn of changing every single caller of the API.

But it should really be a "parameter", and doing it via a struct means
adding such parameters doesn't need to change every single caller.

Then we have outstanding WIP patches for the hook.[ch] API which needed
to add two other parameters...

So I think first ripping off the band-aid of making it painless to
extend the interface is the right thing to do, unless I've missed some
way of doing it that you've just discovered...