Commit 0cc9b77f authored by Evgeny Fiksman's avatar Evgeny Fiksman Committed by Facebook GitHub Bot

Explicitly name hazptr thread pool (#1512)

Summary:
Pull Request resolved: https://github.com/facebook/folly/pull/1512

Hazptr library creates its own CPU executor which name interfere with default executor name. We want to avoid this.
Also insure that the thread is permanent, otherwise folly runtime may destroy and recreate it periodically.

Reviewed By: magedm

Differential Revision: D25708252

fbshipit-source-id: 2b41ad4fa28d2ba9c9bd69bc5d4a02b933d79e66
parent 2e1e68b3
...@@ -23,7 +23,9 @@ namespace { ...@@ -23,7 +23,9 @@ namespace {
struct HazptrTPETag {}; struct HazptrTPETag {};
folly::Singleton<folly::CPUThreadPoolExecutor, HazptrTPETag> hazptr_tpe_([] { folly::Singleton<folly::CPUThreadPoolExecutor, HazptrTPETag> hazptr_tpe_([] {
return new folly::CPUThreadPoolExecutor(1); return new folly::CPUThreadPoolExecutor(
std::make_pair(1, 1),
std::make_shared<folly::NamedThreadFactory>("hazptr-tpe-"));
}); });
folly::Executor* get_hazptr_tpe() { folly::Executor* get_hazptr_tpe() {
......
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