Commit 9c3e3be0 authored by Andrii Grynenko's avatar Andrii Grynenko Committed by facebook-github-bot-0

Fix SIOF in folly/io/async/Request.cpp

Summary: Use Meyers singleton instead.

Reviewed By: afrind

Differential Revision: D2963282

fb-gh-sync-id: 7aec36e7cc3b0ab09b2b093202f40d5b0d399f4d
shipit-source-id: 7aec36e7cc3b0ab09b2b093202f40d5b0d399f4d
parent 787e185c
......@@ -22,13 +22,10 @@
namespace folly {
namespace {
using SingletonT = SingletonThreadLocal<std::shared_ptr<RequestContext>>;
SingletonT singleton;
}
std::shared_ptr<RequestContext>& RequestContext::getStaticContext() {
using SingletonT = SingletonThreadLocal<std::shared_ptr<RequestContext>>;
static SingletonT singleton;
return singleton.get();
}
}
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