From: Jeff King <peff@peff.net>
To: Stefan Beller <sbeller@google.com>
Cc: Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] pkt-line: show packets in async processes as "sideband"
Date: Tue, 1 Sep 2015 18:38:08 -0400 [thread overview]
Message-ID: <20150901223807.GF7862@sigill.intra.peff.net> (raw)
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:
> > 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
prev parent reply other threads:[~2015-09-01 22:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 20:22 [PATCH 0/2] clarify sideband muxing in GIT_TRACE_PACKET Jeff King
2015-09-01 20:22 ` [PATCH 1/2] run-command: provide in_async query function Jeff King
2015-09-01 20:26 ` Jeff King
2015-09-01 22:09 ` Junio C Hamano
2015-09-01 22:17 ` Jeff King
2015-09-01 20:24 ` [PATCH 2/2] pkt-line: show packets in async processes as "sideband" Jeff King
2015-09-01 22:13 ` Junio C Hamano
2015-09-01 22:22 ` Jeff King
2015-09-01 22:23 ` Stefan Beller
2015-09-01 22:26 ` Jeff King
2015-09-01 22:31 ` Stefan Beller
2015-09-01 22:38 ` Jeff King [this message]
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=20150901223807.GF7862@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sbeller@google.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).