git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"

From
Jeff King <peff@peff.net>
Date
Sep 1, 2015, 22:38 UTC
Message-ID
<20150901223807.GF7862@sigill.intra.peff.net>
In-Reply-To
<CAGZ79kYoWWc34GOxyAi5WvYf=UQvt--qwEr_m+bZwKO-uVqkiw@mail.gmail.com>
On Tue, Sep 01, 2015 at 03:31:41PM -0700, Stefan Beller wrote:
Show 10 quoted lines
> > Ah, right, I think I misunderstood Junio's question. Yes, if we start
> > calling cmd_fetch() from inside the threads, things may get confusing.
> >
> > I'll see how painful the thread storage approach would be.
> 
> I think that may be part of the thread pool API eventually.
> 
> I don't plan on relying on thread local storage, which is why I did
> not add it there,
> though I guess it can be added in there quite conveniently.

I think the task_queue and the async code are two separate things, though. The task_queue, when we do not have threads, falls back to doing things serially in a single process. Changing "thread local" variables there is OK, but tasks need to be aware that they might affect subsequent tasks.

Whereas for async code, we fall back to doing things in a forked sub-process. And there "thread local" really is local to the async process, no cleanup required.

-Peff
Previous: Stefan Beller
Message 12 of 12 in “clarify sideband muxing in GIT_TRACE_PACKET”
  1. 0/2 clarify sideband muxing in GIT_TRACE_PACKETJeff King, Sep 1, 2015
  2. 1/2 run-command: provide in_async query functionJeff King, Sep 1, 2015
  3. Jeff KingSep 1, 2015
  4. Junio C HamanoSep 1, 2015
  5. Jeff KingSep 1, 2015
  6. 2/2 pkt-line: show packets in async processes as "sideband"Jeff King, Sep 1, 2015
  7. Junio C HamanoSep 1, 2015
  8. Jeff KingSep 1, 2015
  9. Stefan BellerSep 1, 2015
  10. Jeff KingSep 1, 2015
  11. Stefan BellerSep 1, 2015
  12. Jeff KingSep 1, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.