tberghammer added a comment.

I reverted this change, as it caused some race condition, but see my comment 
inline.


================
Comment at: 
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:2087-2088
@@ +2086,4 @@
+            results.emplace_back(TaskPool::AddTask(parser_fn, cu_idx));
+        for (auto& f : results)
+            f.wait();
+
----------------
clayborg wrote:
> So we are still going to serially wait for the each item in the task list to 
> complete? Don't we want to use TaskRunner::WaitForNextCompletedTask() here?
I don't see any benefit for using TaskRunner::WaitForNextCompletedTask() here 
because we can't really do anything when only a few task is completed and using 
TaskRunner ads an extra layer of indirection (to implement 
WaitForNextCompletedTask) what have a very minor performance hit.

One possible improvement we can do is to do the merging of the indexes on the 
main thread while we are waiting for the parsing tasks to complete, but I am 
not sure if it will have any performance benefit as it would mean that we do it 
on a single thread instead of 9 threads we are doing it now (with 
TaskPool::RunTasks).


Repository:
  rL LLVM

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