[Lldb-commits] [PATCH] D13727: Add task pool to LLDB

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 19 07:30:57 PDT 2015

labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

I think this can go in now. Currently, the paralelization happens on compile unit level, and the test programs generally only have one compile unit. Since the threads are created on an as-needed basis, I don't expect any significant impact of these changes on the test suite.

Comment at: include/lldb/Utility/TaskPool.h:30
@@ +29,3 @@
+// time the task pool is used. The TaskPool provide no gurantee about the order the task will be run
+// and about what tasks will run in parrallel. Non of the task added to the task pool should block
+// on something (mutex, future, condition variable) what will be set only by the completion of an

Comment at: include/lldb/Utility/TaskPool.h:36
@@ +35,3 @@
+    // Add a new task to the thread pool and return a std::future belonging to the newly created
+    // task. The caller of this function has to wait on the future for this task to complete.
thread pool/task pool ?
(several other places as well)

Comment at: include/lldb/Utility/TaskPool.h:69
@@ +68,3 @@
+    // Add a task to the task runner what will also add the task to the global TaskPool. The
+    // function don't return the std::future for the task because it will be supplied by the
+    // WaitForNextCompletedTask after the task is completed.

Comment at: source/Utility/TaskPool.cpp:51
@@ +50,3 @@
+TaskPoolImpl::TaskPoolImpl(uint32_t num_threads) :
+    m_thread_count(0)
num_threads is now unused.


More information about the lldb-commits mailing list