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

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 14 07:32:32 PDT 2015


tberghammer created this revision.
tberghammer added reviewers: labath, clayborg, vharron, zturner.
tberghammer added a subscriber: lldb-commits.
Herald added a subscriber: iancottrell.

Add a new task pool class to LLDB to make it easy to execute tasks in parallel

Basic design goals:
* Have a very lightweight and easy to use interface where a list of lambdas can be executed in parallel
* Use a global thread pool to limit the number of threads used (std::async don't do it on Linux) and to eliminate the thread creation overhead

Possible future improvements (please weight in about priorities about these and add what additional features you want to see):
* Possibility to cancel already added, but not yet started tasks
* Lazy creation of the worker threads
* Removing unused worker threads after some time
* Parallel for_each implementation

The first user of the thread pool will be the dwarf parsing code. An example of how it will be used is available at http://reviews.llvm.org/D13662 (diff 2)

http://reviews.llvm.org/D13727

Files:
  include/lldb/Utility/TaskPool.h
  source/Utility/CMakeLists.txt
  source/Utility/TaskPool.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13727.37351.patch
Type: text/x-patch
Size: 7703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151014/9ffdbbb2/attachment.bin>


More information about the lldb-commits mailing list