tberghammer added a comment.

It is depending on the implementation of std::async what AFAIK isn't defined by 
the standard, but I would expect that a decent stl implementation will create a 
reasonable number of threads (in some sense).

While developing/testing the code (with ~3000 CU in a SymbolFile) I seen that 
the number of running threads (not blocked in a mutex) was around the number of 
cores I have (on Linux x86_64 with libstdc++). It was ~60 threads after fixing 
the mutex in ConstString (http://reviews.llvm.org/D13652) and ~500 before on a 
40 core machine but considering that thread creation isn't expensive on Linux 
we don't have to worry about too much thread if they are blocked anyway (thread 
creation wasn't significant on the profiling output).

I can create manual thread pool (or write a general thread pool class) but I 
think we can rely on the standard library until it is proven that it isn't 
working as we expect.


http://reviews.llvm.org/D13662



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

Reply via email to