[Support] Use unique_function rather than std::function for ThreadPool TaskTy.
authorLang Hames <lhames@gmail.com>
Thu, 10 Sep 2020 17:05:46 +0000 (10:05 -0700)
committerLang Hames <lhames@gmail.com>
Thu, 10 Sep 2020 17:46:46 +0000 (10:46 -0700)
commitd9c8b0256cfc673c2413b13993c9440be598818f
tree50472cef60412835e43501c40746c4258d25266a
parent46329f6079da99133eab7942e79226b2afb40e75
[Support] Use unique_function rather than std::function for ThreadPool TaskTy.

This will allow non-copyable function objects (e.g. lambdas that capture
unique_ptrs) to be used with ThreadPool.

Differential Revision: https://reviews.llvm.org/D87467
llvm/include/llvm/Support/ThreadPool.h
llvm/unittests/Support/ThreadPool.cpp