Mehdi Amini 517dd66ae3 Add a C++11 ThreadPool implementation in LLVM
This is a very simple implementation of a thread pool using C++11
thread. It accepts any std::function<void()> for asynchronous
execution. Individual task can be synchronize using the returned
future, or the client can block on the full queue completion.

In case LLVM is configured with Threading disabled, it falls back
to sequential execution using std::async with launch:deferred.

This is intended to support parallelism for ThinLTO processing in
linker plugin, but is generic enough for any other uses.

Differential Revision: http://reviews.llvm.org/D15464

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255444 91177308-0d34-0410-b5e6-96231b3b80d8
2015-12-12 22:55:25 +00:00
..
2015-06-19 01:53:21 +00:00
2014-06-08 22:29:17 +00:00
2015-06-13 17:23:04 +00:00
2014-09-15 21:51:49 +00:00
2015-11-18 00:31:34 +00:00
2014-12-04 16:59:36 +00:00
2014-12-04 16:59:36 +00:00
2014-06-08 22:29:17 +00:00