thakis added inline comments.

================
Comment at: clang/lib/Driver/Compilation.cpp:303
+    }
+    std::thread Th(Work);
+    Th.detach();
----------------
Maybe a select() / fork() loop is a better approach than spawning one thread 
per subprocess? This is doing thread-level parallelism in addition to 
process-level parallelism :)

If llvm doesn't have a subprocess pool abstraction yet, ninja's is pretty 
small, self-contained, battle-tested and open-source, maybe you could copy that 
over (and remove bits you don't need)?

https://github.com/ninja-build/ninja/blob/master/src/subprocess.h
https://github.com/ninja-build/ninja/blob/master/src/subprocess-win32.cc
https://github.com/ninja-build/ninja/blob/master/src/subprocess-posix.cc


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69582/new/

https://reviews.llvm.org/D69582



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to