[PATCH] D25784: [Support] ThreadPool: Don't spawn any threads when ThreadCount = 1

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 14:46:16 PDT 2016

mehdi_amini added a comment.

Yeah, right now supporting `ThreadCount == 0` seems like the most straightforward and less intrusive way to get it in the API.

> The client I had in mind is llvm-cov, where each thread writes out a coverage report to disk. It is not relatively expensive to spawn a thread in this context. But it would be nice to just have one code path for the threaded+non-threaded cases instead of two.

If spawning a thread is not relatively expensive, why would you bother having a separate code path?


More information about the llvm-commits mailing list