From: Jeff King <email@example.com> To: Jeff Hostetler <firstname.lastname@example.org> Cc: "Randall S. Becker" <email@example.com>, firstname.lastname@example.org, "'SZEDER Gábor'" <email@example.com>, "'Johannes Schindelin via GitGitGadget'" <firstname.lastname@example.org>, email@example.com Subject: Re: [BUG] Unix Builds Requires Pthread Support (was [PATCH v4 00/12] Simple IPC Mechanism) Date: Tue, 18 May 2021 08:11:48 -0400 [thread overview] Message-ID: <YKOvBGjAC2kVPVa7@coredump.intra.peff.net> (raw) In-Reply-To: <firstname.lastname@example.org> On Tue, May 18, 2021 at 07:21:33AM -0400, Jeff Hostetler wrote: > > In the simple-ipc API, there's an explicit "async" interface. But it's > > not clear to me how rich it expects the communication with the caller to > > be (i.e., whether we could get away with the fork() trick here). Or if > > it would be OK for the threading to remain an implementation detail, > > with one "worker" upon whom we wait for completion. > > > > TBH I forgot that we still support NO_PTHREAD systems. > I seem to remember that we got rid of some of the non-pthread > stub functions at one point, but I'm fuzzy on the details. You're probably thinking of when we got rid of a bunch of #ifdef code paths in index-pack, and replaced it with stubs that turn the pthread calls into "do nothing" (so all the ugly stuff is in thread-utils.h now). But we still very much support systems that don't handle pthreads at all. > WRT to "simple ipc" (and future "builtin fsmonitor"), it's heavily > threaded. There's no point in trying to fake it with forks. > > The server side of simple ipc implements a thread pool. And > the builtin fsmonitor will use a thread to monitor FS events > and that thread pool to respond to clients. All driven from a > shared queue of events. > > It would be a major overhaul to do all that without threads > -- and even that assumes that nonstop has a sufficient file > system notification mechanism. OK, that matches my guess from a brief look at the code. Thanks for confirming. > So, yes, we should ifdef it out as Peff suggests. The patch I sent wasn't really tested beyond confirming that "make NO_PTHREADS=1" finished compiling (and that test-tool simple-ipc barfed appropriately at runtime). Do you want to pick it up from there and produce a polished patch? I think we should deal with this prior to the v2.32.0 release (and thanks Randall for testing and finding it during the -rc0 period). -Peff
next prev parent reply other threads:[~2021-05-18 12:11 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-17 17:46 Randall S. Becker 2021-05-18 8:23 ` Jeff King 2021-05-18 11:21 ` Jeff Hostetler 2021-05-18 12:11 ` Jeff King [this message] 2021-05-18 13:55 ` Jeff Hostetler 2021-05-18 13:37 ` Randall S. Becker 2021-05-18 13:59 ` Jeff King
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YKOvBGjAC2kVPVa7@coredump.intra.peff.net \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [BUG] Unix Builds Requires Pthread Support (was [PATCH v4 00/12] Simple IPC Mechanism)' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).