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(
CPUThreadPoolExecutor::CPUThreadPoolExecutor(
size_t numThreads,
std::shared_ptr<ThreadFactory> threadFactory)
: CPUThreadPoolExecutor(
: ThreadPoolExecutor(
numThreads,
std::make_unique<UnboundedBlockingQueue<CPUTask>>(),
std::move(threadFactory)) {}
FLAGS_dynamic_cputhreadpoolexecutor ? 0 : numThreads,
std::move(threadFactory)),
taskQueue_(std::make_unique<UnboundedBlockingQueue<CPUTask>>()) {
setNumThreads(numThreads);
registerThreadPoolExecutor(this);
}
CPUThreadPoolExecutor::CPUThreadPoolExecutor(
std::pair<size_t, size_t> numThreads,
std::shared_ptr<ThreadFactory> threadFactory)
: CPUThreadPoolExecutor(
numThreads,
std::make_unique<UnboundedBlockingQueue<CPUTask>>(),
std::move(threadFactory)) {}
: ThreadPoolExecutor(
numThreads.first,
numThreads.second,
std::move(threadFactory)),
taskQueue_(std::make_unique<UnboundedBlockingQueue<CPUTask>>()) {
setNumThreads(numThreads.first);
registerThreadPoolExecutor(this);
}
CPUThreadPoolExecutor::CPUThreadPoolExecutor(size_t numThreads)
: 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