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

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 12:45:37 PDT 2016

vsk added a comment.

In https://reviews.llvm.org/D25784#574553, @mehdi_amini wrote:

> Thinking a bit more about it, I'm not sure it is intuitive: the client could do something else after issuing a task to the pool. After this patch this computation would no longer occur in parallel.

Fair enough. Do you think the sequential behavior makes sense when ThreadCount = 0? I.e, should we make ThreadPool(0) behave the same way regardless of whether LLVM_ENABLE_THREADS=On|Off? Currently, the sequential behavior does not seem possible when LLVM_ENABLE_THREADS=On.


More information about the llvm-commits mailing list