Commit fbecb252 authored by Andre Pinto's avatar Andre Pinto Committed by Facebook Github Bot

Fix time-test linkage in oss build

Summary:
Somehow gcc49 as used in travis-ci is having a hard time deciding which
constructor to call in `folly/executors/test/ThreadPoolExecutorTest.cpp:721`.
It can't decide between `folly/executors/CPUThreadPoolExecutor.h:69` and
`folly/executors/CPUThreadPoolExecutor.h:83`.
All this diff does is give it a hint about which constructor it should
use.

Reviewed By: yfeldblum

Differential Revision: D8219425

fbshipit-source-id: d92b08efc8bad795ce4a6775efd1e0512aaa6bb5
parent 53484fd2
......@@ -718,10 +718,12 @@ TEST(ThreadPoolExecutorTest, DynamicThreadAddRemoveRace) {
}
TEST(ThreadPoolExecutorTest, AddPerf) {
auto queue = std::make_unique<
UnboundedBlockingQueue<CPUThreadPoolExecutor::CPUTask>>();
CPUThreadPoolExecutor e(
1000,
std::make_unique<
UnboundedBlockingQueue<CPUThreadPoolExecutor::CPUTask>>());
std::move(queue),
std::make_shared<NamedThreadFactory>("CPUThreadPool"));
e.setThreadDeathTimeout(std::chrono::milliseconds(1));
for (int i = 0; i < 10000; i++) {
e.add([&]() { e.add([]() { /* sleep override */ usleep(1000); }); });
......
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