Skip to content

Commit

Permalink
Revert D5012627: [FBCode] Switch various calls to folly::setThreadNam…
Browse files Browse the repository at this point in the history
…e to set the current thread's name

Summary: This reverts commit a4e6e2c2cb5bd02b1ebea85c305eac59355a7d42

Differential Revision: D5012627

fbshipit-source-id: ff4b8ff94d5f5e76f0777b96d03975d3f7834a17
  • Loading branch information
Orvid authored and facebook-github-bot committed May 6, 2017
1 parent fbf9f48 commit 9bf27e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wangle/concurrent/NamedThreadFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class NamedThreadFactory : public ThreadFactory {
: prefix_(prefix.str()), suffix_(0) {}

std::thread newThread(folly::Func&& func) override {
auto thread = std::thread([&](folly::Func&& funct) {
folly::setThreadName(folly::to<std::string>(prefix_, suffix_++));
funct();
}, std::move(func));
auto thread = std::thread(std::move(func));
folly::setThreadName(
thread.native_handle(),
folly::to<std::string>(prefix_, suffix_++));
return thread;
}

Expand Down

0 comments on commit 9bf27e4

Please sign in to comment.