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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html