Re: [PATCH 1/4] run-command: add pipe_output to run_processes_parallel
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 28, 2022, 05:40 UTC
- Message-ID
- <220928.86bkr0xd9w.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <CAFySSZB3hp2WWk0bL77FBR91ueJ1eJFtuVCoyE-ooVT77Vo_vw@mail.gmail.com>
On Tue, Sep 27 2022, Calvin Wan wrote:
Show 8 quoted lines
>> 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...