Commit 2a15a6c6 authored by Dave Watson's avatar Dave Watson

set internal thread factory

Summary: Fix up a TODO

Test Plan: ??  Should I bother with a test?

Reviewed By: jsedgwick@fb.com

Subscribers: doug, fugalh, njormrod, folly-diffs@

FB internal diff: D1710633

Signature: t1:1710633:1417469890:9e8513140bae79da384c9d5418d4ea0840efbe6c
parent 142752b4
......@@ -102,9 +102,11 @@ class ServerBootstrap {
io_group = std::make_shared<folly::wangle::IOThreadPoolExecutor>(
32, std::make_shared<wangle::NamedThreadFactory>("IO Thread"));
}
auto factory = io_group->getThreadFactory();
//CHECK(factory == nullptr); // TODO
auto factoryBase = io_group->getThreadFactory();
CHECK(factoryBase);
auto factory = std::dynamic_pointer_cast<folly::wangle::NamedThreadFactory>(
factoryBase);
CHECK(factory); // Must be named thread factory
CHECK(acceptorFactory_ || pipelineFactory_);
......@@ -115,6 +117,7 @@ class ServerBootstrap {
workerFactory_ = std::make_shared<ServerWorkerFactory>(
std::make_shared<ServerAcceptorFactory<Pipeline>>(pipelineFactory_));
}
workerFactory_->setInternalFactory(factory);
acceptor_group_ = accept_group;
io_group_ = io_group;
......
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