Re: [PATCH/RFC] thread-utils: better wrapper to avoid #ifdef NO_PTHREADS
- From
Jeff King <peff@peff.net>
- Date
- Oct 27, 2018, 08:17 UTC
- Message-ID
- <20181027081724.GH26685@sigill.intra.peff.net>
- In-Reply-To
- <CACsJy8D8a-0R=J6nCPwBAypYF=rejgT-3QFnuK1h3vMcJGG7_A@mail.gmail.com>
On Sat, Oct 27, 2018 at 09:26:28AM +0200, Duy Nguyen wrote:
Show 12 quoted lines
> On Fri, Oct 26, 2018 at 4:09 PM Ben Peart <peartben@gmail.com> wrote: > > I agree though I'm still curious if there are still no-threaded > > platforms taking new versions of git. Perhaps we should do the > > depreciation warning you suggested elsewhere and see how much push back > > we get. It's unlikely we'd get lucky and be able to stop supporting > > them completely but it's worth asking! > > NO_PTHREADS can also be used even though the platform supports > multithread: to make keep git execution in a single core/thread. It > might matter on hosted systems with limited cpu power and you don't > want git to hog it all. Yes it can also be achieved by setting a > zillion config keys to "1", this way is just simpler.
Yeah, I wondered about that use case (also with your patches, and whether they might run into problems on systems that _do_ have pthreads, but just don't want to compile with them).
But I think that is pretty easily solved by just having a single runtime option (e.g., to just pretend that oneline_cpus is always 1 by default).
-Peff