zturner added a comment. You can probably limit the number of threads portably by using a sempahore that blocks after it's been acquired `std::thread::hardware_concurrency()` times. http://reviews.llvm.org/D13662