Commit 506ab28c authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Workaround for something that looks like a compiler bug

Summary: Workaround for something that looks like a compiler bug

Reviewed By: kevin-vigor

Differential Revision: D18700404

fbshipit-source-id: 6d9c9a40e9e468ee910c5456bcbfdf02c1b1c59a
parent 8a6095a5
...@@ -59,18 +59,26 @@ CPUThreadPoolExecutor::CPUThreadPoolExecutor( ...@@ -59,18 +59,26 @@ CPUThreadPoolExecutor::CPUThreadPoolExecutor(
CPUThreadPoolExecutor::CPUThreadPoolExecutor( CPUThreadPoolExecutor::CPUThreadPoolExecutor(
size_t numThreads, size_t numThreads,
std::shared_ptr<ThreadFactory> threadFactory) std::shared_ptr<ThreadFactory> threadFactory)
: CPUThreadPoolExecutor( : ThreadPoolExecutor(
numThreads, numThreads,
std::make_unique<UnboundedBlockingQueue<CPUTask>>(), FLAGS_dynamic_cputhreadpoolexecutor ? 0 : numThreads,
std::move(threadFactory)) {} std::move(threadFactory)),
taskQueue_(std::make_unique<UnboundedBlockingQueue<CPUTask>>()) {
setNumThreads(numThreads);
registerThreadPoolExecutor(this);
}
CPUThreadPoolExecutor::CPUThreadPoolExecutor( CPUThreadPoolExecutor::CPUThreadPoolExecutor(
std::pair<size_t, size_t> numThreads, std::pair<size_t, size_t> numThreads,
std::shared_ptr<ThreadFactory> threadFactory) std::shared_ptr<ThreadFactory> threadFactory)
: CPUThreadPoolExecutor( : ThreadPoolExecutor(
numThreads, numThreads.first,
std::make_unique<UnboundedBlockingQueue<CPUTask>>(), numThreads.second,
std::move(threadFactory)) {} std::move(threadFactory)),
taskQueue_(std::make_unique<UnboundedBlockingQueue<CPUTask>>()) {
setNumThreads(numThreads.first);
registerThreadPoolExecutor(this);
}
CPUThreadPoolExecutor::CPUThreadPoolExecutor(size_t numThreads) CPUThreadPoolExecutor::CPUThreadPoolExecutor(size_t numThreads)
: CPUThreadPoolExecutor( : CPUThreadPoolExecutor(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment